<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>gui2py: Fichero Fuente build/lib.linux-x86_64-2.7/gui/component.py</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../edit.gif"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">gui2py
   &#160;<span id="projectnumber">0.9.3</span>
   </div>
   <div id="projectbrief">Interfaz de desarrollo de aplicaciones graficas</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generado por Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Buscar');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Página&#160;principal</span></a></li>
      <li><a href="../../namespaces.html"><span>Paquetes</span></a></li>
      <li><a href="../../annotated.html"><span>Clases</span></a></li>
      <li class="current"><a href="../../files.html"><span>Archivos</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Buscar" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>Lista&#160;de&#160;archivos</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Todo</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Clases</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Archivos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Funciones</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Propiedades</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">component.py</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py.html">Ir a la documentación de este archivo.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html">    1</a></span>&#160;<span class="comment">#!/usr/bin/python</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"># -*- coding: utf-8 -*-</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="stringliteral">&quot;gui2py&#39;s Components Object Model: base &amp; super classes, metaclasses and mixins&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div>
<div class="line"><a name="l00006"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a4c0f38d393d8332a165fa36928267ad0">    6</a></span>&#160;__author__ = <span class="stringliteral">&quot;Mariano Reingart (reingart@gmail.com)&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a5c556d31698d8215a6a02f05f17093ba">    7</a></span>&#160;__copyright__ = <span class="stringliteral">&quot;Copyright (C) 2013- Mariano Reingart&quot;</span>  <span class="comment"># where applicable</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"># Initial implementation was based on PythonCard&#39;s component module, altought</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"># most of it was redesigned and overhauled a lot, mainly:</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">#  * ComponentBase (metaclass) &amp; ComponentMeta were inspired by Django&#39;s models</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">#  * Widget was renamed to Control (wx.Control, Component abstract wx.Window)</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">#  * SubComponent and DesignerMixin &amp; SizerMixin are completely new</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">#  * ImageBackgroundMixin was refactorized from Pythoncards Panel</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"># Note: PyhonCard spec and event model were almost completely discarded</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">import</span> decimal</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="keyword">import</span> datetime</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">import</span> wx</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">from</span> .event <span class="keyword">import</span> FocusEvent, MouseEvent, KeyEvent</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">from</span> .font <span class="keyword">import</span> Font</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">from</span> .graphic <span class="keyword">import</span> Bitmap, Color</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">from</span> .spec <span class="keyword">import</span> Spec, EventSpec, InitSpec, DimensionSpec, StyleSpec, InternalSpec</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">from</span> . <span class="keyword">import</span> registry</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a853594a844c105ca76df7a3554ab9ed0">   27</a></span>&#160;DEBUG = <span class="keyword">False</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#afa27c0dac0fcd185a6e8f7f5ff3b9b17">   28</a></span>&#160;COMPONENTS = {}        <span class="comment"># map all created objects (used to search parents) </span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a0ead4234528428d82574b2645a82754d">   29</a></span>&#160;STACK = []             <span class="comment"># used by the context manager to store parent references</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment"># WORKAROUND: 2.8 does not have WrapSizer, use custom FlowSizer instead:</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keywordflow">if</span> wx.VERSION &gt;= (2, 9):</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#acbdd7327932847cde657f8cac3613ccf">   34</a></span>&#160;    wx_WrapSizer = wx.WrapSizer</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keyword">from</span> .flowsizer <span class="keyword">import</span> FlowSizer <span class="keyword">as</span> wx_WrapSizer</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html">   39</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html">ComponentMeta</a>():</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="stringliteral">&quot;Component Metadata&quot;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#abf6dbc2a7c6a9591b18f317659b5ebdb">   41</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#abf6dbc2a7c6a9591b18f317659b5ebdb">__init__</a>(self, name, specs):</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#ac6589e4ebfceeeb2c5d9397ba64c0c1d">   42</a></span>&#160;        self.<a class="code" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#ac6589e4ebfceeeb2c5d9397ba64c0c1d">name</a> = name</div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#aa097f2ce1c36fd36b66714feea9ee641">   43</a></span>&#160;        self.<a class="code" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#aa097f2ce1c36fd36b66714feea9ee641">specs</a> = specs</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#aed0faecc101658abbe1e061859673a9b">   44</a></span>&#160;        self.<a class="code" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#aed0faecc101658abbe1e061859673a9b">valid_children</a> = []</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#a34a7f2319dd859b55d0d8776ed453962">   45</a></span>&#160;        self.<a class="code" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#a34a7f2319dd859b55d0d8776ed453962">facade</a> = <span class="keyword">False</span>         <span class="comment"># enable facade (fake screenshot ) at design</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#ab7b249e14e303e4ba375043ac1ce7517">   46</a></span>&#160;        self.<a class="code" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#ab7b249e14e303e4ba375043ac1ce7517">container</a> = <span class="keyword">False</span>      <span class="comment"># True if can contain controls</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    </div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="../../d1/db2/classgui_1_1component_1_1ComponentBase.html">   49</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d1/db2/classgui_1_1component_1_1ComponentBase.html">ComponentBase</a>(type):</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="stringliteral">&quot;Component class constructor (creates metadata and register the component)&quot;</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../d1/db2/classgui_1_1component_1_1ComponentBase.html#a1e1e9e905348b74b46c8bfddc0fb078d">   51</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/db2/classgui_1_1component_1_1ComponentBase.html#a1e1e9e905348b74b46c8bfddc0fb078d">__new__</a>(cls, name, bases, attrs):</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        super_new = super(ComponentBase, cls).__new__</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    </div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <span class="comment"># Create the class.</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        new_class = super_new(cls, name, bases, attrs)</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        specs = {}</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="comment"># get specs of the base classes</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordflow">for</span> base <span class="keywordflow">in</span> bases:</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;            <span class="keywordflow">if</span> hasattr(base, <span class="stringliteral">&quot;_meta&quot;</span>):</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                specs.update(base._meta.specs)</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="comment"># get all the specs</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        specs.update(dict([(attr_name, attr_value) </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                        <span class="keywordflow">for</span> attr_name, attr_value <span class="keywordflow">in</span> attrs.items() </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                        <span class="keywordflow">if</span> isinstance(attr_value, Spec)]))</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="comment"># insert a _meta attribute with the specs</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        new_class._meta = <a class="code" href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html">ComponentMeta</a>(name, specs)</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="comment"># registry and return the new class:</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <span class="keywordflow">if</span> hasattr(new_class, <span class="stringliteral">&quot;_registry&quot;</span>):</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;            new_class._registry[name] = new_class</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            <span class="keywordflow">if</span> name <span class="keywordflow">not</span> <span class="keywordflow">in</span> registry.ALL:</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;                registry.ALL.append(name)</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="keywordflow">return</span> new_class</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  </div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html">   77</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html">Component</a>(object):</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="stringliteral">&quot;The base class for all of our GUI elements&quot;</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    </div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="comment"># Each Component must bind itself to the wxPython event model.  </span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="comment"># When it receives an event from wxPython, it will convert the event</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="comment"># to a gui.event.Event ( UIEvent, MouseEvent, etc ) and call the handler</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="comment"># This is the base class wich all GUI Elements should derive </span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="comment"># (TopLevelWindows -Frame, Dialog, etc.- and Controls)</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="comment"># This object maps to wx.Window, but avoid that name as it can be confusing.</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    </div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a43df6aeda03afe0dae9d50f1e93be586">   88</a></span>&#160;    __metaclass__ = ComponentBase</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#aaab6b5b527f205a95789d513ed32bdba">   89</a></span>&#160;    _wx_class = wx.Window       <span class="comment"># wx object constructor</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a24b89ca59d3def616f3cb71878a61d16">   90</a></span>&#160;    _style = 0                  <span class="comment"># base style</span></div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a87045fa0f9df60d9829c1f5406035821">   91</a></span>&#160;    _image = <span class="keywordtype">None</span>               <span class="comment"># default icon for toolbox</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    </div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8840a9ac7832fd8ceffe76fa78c3395b">   93</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8840a9ac7832fd8ceffe76fa78c3395b">__init__</a>(self, parent=None, **kwargs):</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="comment"># create the wxpython kw arguments (based on specs and defaults)</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        wx_kwargs = dict(id=<a class="code" href="../../d9/d90/namespacegui_1_1component.html#a5334beaff782e6f4b7f39e4d000539cb">new_id</a>(kwargs.get(<span class="stringliteral">&#39;id&#39;</span>)))</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        </div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        <span class="comment"># check if we are recreating the object (i.e., to apply a new style)</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        rebuild = hasattr(self, <span class="stringliteral">&quot;wx_obj&quot;</span>)</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        </div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <span class="comment"># if using context manager, use the parent reference from the creation stack:</span></div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> parent <span class="keywordflow">and</span> STACK:</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;            parent = STACK[-1]</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;            <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;using parent stack &quot;</span>, parent</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <span class="comment"># get current spec values (if we are re-creating the wx object)</span></div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <span class="keywordflow">if</span> rebuild:</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;            <span class="keywordflow">for</span> spec_name, spec <span class="keywordflow">in</span> self._meta.specs.items():</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                <span class="keywordflow">if</span> spec_name <span class="keywordflow">in</span> kwargs:</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;                    <span class="keywordflow">continue</span>    <span class="comment"># use provided new value</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;                <span class="keywordflow">if</span> <span class="keywordflow">not</span> isinstance(spec, (InternalSpec)):</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;                    <span class="comment"># get the current value and store it in kwargs</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                    kwargs[spec_name]  = getattr(self, spec_name)</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;            self.wx_obj.Visible = <span class="keyword">False</span></div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;            old_wx_obj = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">wx_obj</a></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;            self.wx_obj.obj = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;            del self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">wx_obj</a></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;kwargs&quot;</span>, kwargs</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            <span class="keywordflow">if</span> isinstance(self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a>, Component):</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                del self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a>[self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">_name</a>]    <span class="comment"># remove old child reference</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#ad146f1473fa23139699d793758a6aaee">set_parent</a>(parent, init=<span class="keyword">True</span>)</div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a7422d4b1d8b3973416b46dd67857b751">  123</a></span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a7422d4b1d8b3973416b46dd67857b751">_font</a> = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#abfd05bb211fa6d33d9d501229068c00b">  124</a></span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a9e841f80226d6be4dea910847f78b927">_bgcolor</a> = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#abfd05bb211fa6d33d9d501229068c00b">_fgcolor</a> = <span class="keyword">False</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            <span class="comment"># container to hold children:</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a3d8f3873f0dde58ce5e99fbb776c6502">  126</a></span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a3d8f3873f0dde58ce5e99fbb776c6502">_children_dict</a> = {}    <span class="comment"># key and values for __setitem__</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#afca69a2b56bcce7a162ce1a55aed7d35">  127</a></span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#afca69a2b56bcce7a162ce1a55aed7d35">_children_list</a> = []    <span class="comment"># ordered values for __iter__</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;            old_wx_obj = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        </div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">  130</a></span>&#160;        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">wx_obj</a> = <span class="keywordtype">None</span>      <span class="comment"># set up a void wx object (needed by setters)</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <span class="keywordflow">for</span> spec_name, spec <span class="keywordflow">in</span> self._meta.specs.items():</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            value = kwargs.get(spec_name, spec.default)</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            <span class="comment"># no not apply a spec if we are re-creating the wx object:</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;            <span class="keywordflow">if</span> rebuild <span class="keywordflow">and</span> spec_name <span class="keywordflow">not</span> <span class="keywordflow">in</span> kwargs:</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;                <span class="keywordflow">continue</span>    <span class="comment"># use previously _style</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            <span class="keywordflow">if</span> isinstance(spec, InitSpec):</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;                <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;INIT: setting &quot;</span>, spec_name, value</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;                <span class="keywordflow">if</span> <span class="keywordflow">not</span> spec.optional <span class="keywordflow">and</span> value <span class="keywordflow">is</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;                    <span class="keywordflow">raise</span> ValueError(<span class="stringliteral">&quot;%s: %s is not optional&quot;</span> % </div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;                                        (self._meta.name, spec_name))</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;                <span class="keywordflow">if</span> spec._name:</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;                    name = spec._name[1:]   <span class="comment"># use the internal name</span></div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;                    <span class="keywordflow">if</span> name == <span class="stringliteral">&quot;name&quot;</span>:</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af746236f93baeb6dffa429d430be6728">_set_name</a>(value)</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                    <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;                        setattr(self, spec._name, value)</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;                <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;                    name = spec_name        <span class="comment"># use the spec attribute name</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;                <span class="keywordflow">if</span> value <span class="keywordflow">is</span> <span class="keywordflow">not</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;                    wx_kwargs[name] = value</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;                <span class="keywordflow">if</span> spec_name <span class="keywordflow">in</span> kwargs:</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;                    del kwargs[spec_name]</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;            <span class="keywordflow">if</span> isinstance(spec, StyleSpec):</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;                <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;setting&quot;</span>, spec_name, value, spec</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;                setattr(self, spec_name, value)</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;                <span class="keywordflow">if</span> spec_name <span class="keywordflow">in</span> kwargs:</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;                    del kwargs[spec_name]</div>
<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8ed4b7c8565bf3f775fd8f24dfbac818">  159</a></span>&#160;        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8ed4b7c8565bf3f775fd8f24dfbac818">_wx_kwargs</a> = wx_kwargs</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        </div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        <span class="comment"># create the actual wxpython object</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        <span class="keywordflow">if</span> hasattr(self, <span class="stringliteral">&quot;_kind&quot;</span>):  <span class="comment"># hack to support menu items (TODO: fix)</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8ed4b7c8565bf3f775fd8f24dfbac818">_wx_kwargs</a>[<span class="stringliteral">&#39;kind&#39;</span>] = self._kind</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8ed4b7c8565bf3f775fd8f24dfbac818">_wx_kwargs</a>[<span class="stringliteral">&#39;style&#39;</span>] = style = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a24b89ca59d3def616f3cb71878a61d16">_style</a></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;WX KWARGS: &quot;</span>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8ed4b7c8565bf3f775fd8f24dfbac818">_wx_kwargs</a></div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;creating&quot;</span>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aaab6b5b527f205a95789d513ed32bdba">_wx_class</a></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a> <span class="keywordflow">is</span> <span class="keywordtype">None</span> <span class="keywordflow">or</span> isinstance(self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a>, wx.Object):</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;            wx_parent = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a></div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            wx_parent = self._parent.wx_obj</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        <span class="comment"># sanitize parameters</span></div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        <span class="keywordflow">if</span> <span class="stringliteral">&#39;id&#39;</span> <span class="keywordflow">in</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8ed4b7c8565bf3f775fd8f24dfbac818">_wx_kwargs</a> <span class="keywordflow">and</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8ed4b7c8565bf3f775fd8f24dfbac818">_wx_kwargs</a>[<span class="stringliteral">&#39;id&#39;</span>] &lt;= 0:</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8ed4b7c8565bf3f775fd8f24dfbac818">_wx_kwargs</a>[<span class="stringliteral">&#39;id&#39;</span>] = -1</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;            </div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">wx_obj</a> = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aaab6b5b527f205a95789d513ed32bdba">_wx_class</a>(wx_parent, **self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8ed4b7c8565bf3f775fd8f24dfbac818">_wx_kwargs</a>)</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <span class="comment"># load specs from kwargs, use default if available</span></div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        <span class="keywordflow">for</span> spec_name, spec <span class="keywordflow">in</span> sorted(self._meta.specs.items(),</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;                                      key=<span class="keyword">lambda</span> it: it[1].order):</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            <span class="keywordflow">if</span> spec.read_only <span class="keywordflow">or</span> isinstance(spec, (StyleSpec, InitSpec, InternalSpec)):</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;                <span class="keywordflow">continue</span></div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;            <span class="comment"># get the spec value for kwargs, if it is optional, get the default</span></div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            <span class="keywordflow">if</span> spec_name <span class="keywordflow">in</span> kwargs:</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;                <span class="comment"># set the value passed to the constructor</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;                setattr(self, spec_name, kwargs[spec_name])</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            <span class="keywordflow">elif</span> spec.default <span class="keywordflow">is</span> <span class="keywordflow">not</span> <span class="keywordtype">None</span> <span class="keywordflow">or</span> isinstance(spec, EventSpec):</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;                <span class="comment"># set the default value</span></div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;                setattr(self, spec_name, spec.default)</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            <span class="keywordflow">elif</span> <span class="keywordflow">not</span> spec.optional:</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;                <span class="keywordflow">raise</span> ValueError(<span class="stringliteral">&quot;%s: %s is not optional&quot;</span> % (self._meta.name,</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;                                                             spec_name))</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;            <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;                <span class="comment"># asign a empty value (just to set up internal properties)</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;                setattr(self, spec_name, <span class="keywordtype">None</span>)</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;                    </div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="comment"># store gui reference inside of wx object</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        self.wx_obj.obj = self</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <span class="keywordflow">if</span> isinstance(self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a>, Component) <span class="keywordflow">and</span> getattr(self, <span class="stringliteral">&quot;_name&quot;</span>, <span class="keywordtype">None</span>):</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a>[self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">_name</a>] = self     <span class="comment"># add child reference</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;            COMPONENTS[self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aef1d100fe1c668847583366148620873">_get_fully_qualified_name</a>()] = self  </div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        </div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        <span class="comment"># re-associate childrens (wx objects hierachy): </span></div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        <span class="keywordflow">if</span> rebuild:</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;            <span class="keywordflow">for</span> ctrl <span class="keywordflow">in</span> self:</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;                ctrl.set_parent(self)</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        <span class="comment"># destroy previous wx object </span></div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        <span class="comment"># (after reparent so children are not destroyed)</span></div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        <span class="keywordflow">if</span> old_wx_obj:</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;            old_wx_obj.Destroy()</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;                </div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        <span class="comment"># finally, set special internal spec (i.e. designer)</span></div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <span class="comment"># (this must be done at last to overwrite other event handlers)</span></div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        <span class="keywordflow">for</span> spec_name, spec <span class="keywordflow">in</span> sorted(self._meta.specs.items(),</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;                                      key=<span class="keyword">lambda</span> it: it[1].order):</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;            <span class="keywordflow">if</span> isinstance(spec, InternalSpec) <span class="keywordflow">and</span> <span class="keywordflow">not</span> spec.read_only:</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;                <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;resetting internal specs (rebound...):&quot;</span>, spec_name, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a814a311328f2d8bb6fa6c9db969725ef">name</a></div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;                value = kwargs.get(spec_name, getattr(self, spec_name, spec.default))</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                setattr(self, spec_name, value)</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;            <span class="keywordflow">if</span> isinstance(spec, InitSpec):</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;                <span class="comment"># override special dimension init values passed directly</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;                <span class="keywordflow">if</span> spec_name == <span class="stringliteral">&#39;pos&#39;</span> <span class="keywordflow">and</span> <span class="stringliteral">&#39;pos&#39;</span> <span class="keywordflow">in</span> wx_kwargs:</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;                    x, y = wx_kwargs[<span class="stringliteral">&#39;pos&#39;</span>]</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;                    <span class="keywordflow">if</span> x &gt;= 0:</div>
<div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a83bf6108298ad8d8e8febed78237261a">  225</a></span>&#160;                        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a83bf6108298ad8d8e8febed78237261a">_left</a> = str(x)</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;                    <span class="keywordflow">if</span> y &gt;= 0:</div>
<div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#ab1d4f5cb9769d145ebf1f1db21f5b9aa">  227</a></span>&#160;                        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#ab1d4f5cb9769d145ebf1f1db21f5b9aa">_top</a> = str(y)</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;                <span class="keywordflow">elif</span> spec_name == <span class="stringliteral">&#39;size&#39;</span> <span class="keywordflow">and</span> <span class="stringliteral">&#39;size&#39;</span> <span class="keywordflow">in</span> wx_kwargs:</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;                    w, h = wx_kwargs[<span class="stringliteral">&#39;size&#39;</span>]</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                    <span class="keywordflow">if</span> w &gt;= 0:</div>
<div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#af58429399152c275ceb33ed4e99ffe3d">  231</a></span>&#160;                        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af58429399152c275ceb33ed4e99ffe3d">_width</a> = str(w)</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                    <span class="keywordflow">if</span> h &gt;= 0:</div>
<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#aee407093fea1b51db38cf665dfd18003">  233</a></span>&#160;                        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aee407093fea1b51db38cf665dfd18003">_height</a> = str(h)</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;</div>
<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a38b6ef236dbf70e06e0c65705d78ac50">  235</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a38b6ef236dbf70e06e0c65705d78ac50">rebuild</a>(self, recreate=True, force=False, **kwargs):</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        <span class="stringliteral">&quot;Recreate (if needed) the wx_obj and apply new properties&quot;</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;        <span class="comment"># detect if this involves a spec that needs to recreate the wx_obj:</span></div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        needs_rebuild = any([isinstance(spec, (StyleSpec, InitSpec)) </div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;                             <span class="keywordflow">for</span> spec_name, spec <span class="keywordflow">in</span> self._meta.specs.items()</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                             <span class="keywordflow">if</span> spec_name <span class="keywordflow">in</span> kwargs])</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        <span class="comment"># validate if this gui object needs and support recreation</span></div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        <span class="keywordflow">if</span> needs_rebuild <span class="keywordflow">and</span> recreate <span class="keywordflow">or</span> force:</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;            <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;rebuilding window!&quot;</span></div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;            <span class="comment"># recreate the wx_obj! warning: it will call Destroy()</span></div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8840a9ac7832fd8ceffe76fa78c3395b">__init__</a>(**kwargs)       </div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;just setting attr!&quot;</span></div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;            <span class="keywordflow">for</span> name, value <span class="keywordflow">in</span> kwargs.items():</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                setattr(self, name, value)</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div>
<div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#af3df42fd86675ecdea82dc1338542649">  252</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af3df42fd86675ecdea82dc1338542649">__del__</a>(self):</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        <span class="stringliteral">&quot;Destructor: clean-up all references&quot;</span></div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a878dfade57f994abd7b7df40bad3505f">destroy</a>()</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    </div>
<div class="line"><a name="l00256"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a878dfade57f994abd7b7df40bad3505f">  256</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a878dfade57f994abd7b7df40bad3505f">destroy</a>(self):</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        <span class="stringliteral">&quot;Remove event references and destroy wx object (and children)&quot;</span></div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <span class="comment"># unreference the obj from the components map and parent</span></div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">_name</a>:</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;            del COMPONENTS[self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aef1d100fe1c668847583366148620873">_get_fully_qualified_name</a>()]</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;            <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;deleted from components!&quot;</span></div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;            <span class="keywordflow">if</span> isinstance(self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a>, Component):</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;                del self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a>[self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">_name</a>]</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;                <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;deleted from parent!&quot;</span></div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        <span class="comment"># destroy the wx_obj (only if sure that reference is not needed!)</span></div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">wx_obj</a>:</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;            self.wx_obj.Destroy()</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;            <span class="keywordflow">for</span> child <span class="keywordflow">in</span> self:</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;                <span class="keywordflow">print</span> <span class="stringliteral">&quot;destroying child&quot;</span>, </div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;                child.destroy()</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        <span class="comment"># destroy the designer selection marker (if any)</span></div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        <span class="keywordflow">if</span> hasattr(self, <span class="stringliteral">&#39;sel_marker&#39;</span>) <span class="keywordflow">and</span> self.sel_marker:</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;            self.sel_marker.destroy()</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        <span class="keywordflow">if</span> hasattr(self, <span class="stringliteral">&#39;facade&#39;</span>) <span class="keywordflow">and</span> self.facade:</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;            self.facade.destroy()</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;            </div>
<div class="line"><a name="l00277"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a2a4e1ce9390e14e18785d56086a422c5">  277</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a2a4e1ce9390e14e18785d56086a422c5">duplicate</a>(self, new_parent=None):</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        <span class="stringliteral">&quot;Create a new object exactly similar to self&quot;</span></div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;        kwargs = {}</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        <span class="keywordflow">for</span> spec_name, spec <span class="keywordflow">in</span> self._meta.specs.items():</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;            value = getattr(self, spec_name)</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;            <span class="keywordflow">if</span> isinstance(value, Color):</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;                <span class="keywordflow">print</span> <span class="stringliteral">&quot;COLOR&quot;</span>, value, value.default</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;                <span class="keywordflow">if</span> value.default:</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;                    value = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;            <span class="keywordflow">if</span> value <span class="keywordflow">is</span> <span class="keywordflow">not</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;                kwargs[spec_name] = value</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        del kwargs[<span class="stringliteral">&#39;parent&#39;</span>] </div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;        new_id = wx.NewId()</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;        kwargs[<span class="stringliteral">&#39;id&#39;</span>] = new_id</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;        kwargs[<span class="stringliteral">&#39;name&#39;</span>] = <span class="stringliteral">&quot;%s_%s&quot;</span> % (kwargs[<span class="stringliteral">&#39;name&#39;</span>], new_id)</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;        new_obj = self.__class__(new_parent <span class="keywordflow">or</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a22d66b10bb4fbe00b4d237c42dae1264">get_parent</a>(), **kwargs)</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;        <span class="comment"># recursively create a copy of each child (in the new parent!)</span></div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;        <span class="keywordflow">for</span> child <span class="keywordflow">in</span> self:</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;            child.duplicate(new_obj)</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;        <span class="keywordflow">return</span> new_obj</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;</div>
<div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a0c4c99417623d8e4a809e1f3f43aeaea">  298</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a0c4c99417623d8e4a809e1f3f43aeaea">reindex</a>(self, z=None):</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        <span class="stringliteral">&quot;Raises/lower the component in the window hierarchy (Z-order/tab order)&quot;</span></div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        <span class="comment"># z=0: lowers(first index), z=-1: raises (last)</span></div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;        <span class="comment"># actually, only useful in design mode</span></div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        <span class="keywordflow">if</span> isinstance(self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a>, Component):</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;            <span class="comment"># get the current index (z-order)</span></div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;            <span class="keywordflow">if</span> <span class="keywordflow">not</span> self <span class="keywordflow">in</span> self._parent._children_list:</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;                <span class="keywordflow">return</span> len(self._parent._children_list)</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;            i = self._parent._children_list.index(self)</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;            <span class="keywordflow">if</span> z <span class="keywordflow">is</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;                <span class="keywordflow">return</span> i</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;            <span class="keywordflow">if</span> <span class="keywordflow">not</span> hasattr(self, <span class="stringliteral">&quot;designer&quot;</span>) <span class="keywordflow">and</span> <span class="keywordflow">not</span> self.designer:</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;                <span class="keywordflow">raise</span> RuntimeError(<span class="stringliteral">&quot;reindexing can only be done on design mode&quot;</span>)</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;            <span class="comment"># delete the element reference from the list</span></div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;            del self._parent._children_list[i]</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;            <span class="comment"># insert as last element</span></div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;            <span class="keywordflow">if</span> z &lt; 0:</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;                self._parent._children_list.append(self)</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;            <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;                self._parent._children_list.insert(z, self)</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;            </div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    <span class="comment"># Container methods:</span></div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;</div>
<div class="line"><a name="l00322"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a23b31afece34b6d5d5c7348d14d9ae9b">  322</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a23b31afece34b6d5d5c7348d14d9ae9b">__iter__</a>(self):</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;        <span class="keywordflow">return</span> self._children_list.__iter__()</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;    </div>
<div class="line"><a name="l00325"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8f6cb81e7f6459e6871b084af54b7286">  325</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8f6cb81e7f6459e6871b084af54b7286">__setitem__</a>(self, name, child):</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a3d8f3873f0dde58ce5e99fbb776c6502">_children_dict</a>[name] = child</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;        <span class="keywordflow">if</span> child <span class="keywordflow">not</span> <span class="keywordflow">in</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#afca69a2b56bcce7a162ce1a55aed7d35">_children_list</a> <span class="keywordflow">and</span> hasattr(self, <span class="stringliteral">&quot;_sizer_add&quot;</span>):</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;             self._sizer_add(child)</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;        self._children_list.append(child)</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;        </div>
<div class="line"><a name="l00331"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#aff477be6ffebb453465d6403a57738a3">  331</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aff477be6ffebb453465d6403a57738a3">__getitem__</a>(self, key):</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;        <span class="keywordflow">if</span> isinstance(key, slice):</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;            <span class="keywordflow">return</span> self._children_list.__getitem__(key)</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;            <span class="keywordflow">return</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a3d8f3873f0dde58ce5e99fbb776c6502">_children_dict</a>[key]</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    </div>
<div class="line"><a name="l00337"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#ac5cfbd4fdf26625760ad692660e25357">  337</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#ac5cfbd4fdf26625760ad692660e25357">__delitem__</a>(self, name):</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;        del self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#afca69a2b56bcce7a162ce1a55aed7d35">_children_list</a>[self._children_list.index(self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a3d8f3873f0dde58ce5e99fbb776c6502">_children_dict</a>[name])]</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;        del self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a3d8f3873f0dde58ce5e99fbb776c6502">_children_dict</a>[name]</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    <span class="comment"># context manager methods (with statement currently used to stack parents)</span></div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;</div>
<div class="line"><a name="l00343"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#afbf6675f7d4282b7c5b9d510569561d0">  343</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#afbf6675f7d4282b7c5b9d510569561d0">__enter__</a>(self):</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;        STACK.append(self)</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;pushed&quot;</span>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a814a311328f2d8bb6fa6c9db969725ef">name</a></div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;        <span class="keywordflow">return</span> self</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;    </div>
<div class="line"><a name="l00348"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#aa5e963ca7c0e85dda2d7763a5a6883f6">  348</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aa5e963ca7c0e85dda2d7763a5a6883f6">__exit__</a>(self, *exc_info):</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;        obj = STACK.pop()</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;popped&quot;</span>, obj.name</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;            </div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;    <span class="comment"># Public methods:</span></div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    </div>
<div class="line"><a name="l00354"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a747e3b93be49b1cb7c09cd8ac7cf6fad">  354</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a747e3b93be49b1cb7c09cd8ac7cf6fad">redraw</a>(self):</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;        <span class="stringliteral">&quot;Force an immediate redraw without waiting for an event handler to finish.&quot;</span></div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;        self.wx_obj.Refresh()</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;        self.wx_obj.Update()</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;</div>
<div class="line"><a name="l00359"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a3ae76ac584aeb9c75b867165a31c77ab">  359</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a3ae76ac584aeb9c75b867165a31c77ab">set_focus</a>(self):</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;        self.wx_obj.SetFocus()</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;    </div>
<div class="line"><a name="l00362"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#ad146f1473fa23139699d793758a6aaee">  362</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#ad146f1473fa23139699d793758a6aaee">set_parent</a>(self, new_parent, init=False):</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;        <span class="stringliteral">&quot;Store the gui/wx object parent for this component&quot;</span></div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;        <span class="comment"># set init=True if this is called from the constructor</span></div>
<div class="line"><a name="l00365"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">  365</a></span>&#160;        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a> = <a class="code" href="../../d9/d90/namespacegui_1_1component.html#a937836205f3a4daa11179df3fc58e3c9">get</a>(new_parent, init)    <span class="comment"># store new parent</span></div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    </div>
<div class="line"><a name="l00367"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a22d66b10bb4fbe00b4d237c42dae1264">  367</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a22d66b10bb4fbe00b4d237c42dae1264">get_parent</a>(self):</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;        <span class="stringliteral">&quot;Return the object parent for this component (either gui or wx)&quot;</span></div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;        <span class="keywordflow">return</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a></div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;</div>
<div class="line"><a name="l00371"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a311db6e15161ccbe876a1ff7662ba2a2">  371</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a311db6e15161ccbe876a1ff7662ba2a2">_get_parent_name</a>(self):</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        <span class="stringliteral">&quot;Return parent window name (used in __repr__ parent spec)&quot;</span></div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        parent = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a22d66b10bb4fbe00b4d237c42dae1264">get_parent</a>()</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;        parent_names = []</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;        <span class="keywordflow">while</span> parent:</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;            <span class="keywordflow">if</span> isinstance(parent, Component):</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;                parent_name = parent.name</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;                <span class="comment"># Top Level Windows has no parent!</span></div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;                <span class="keywordflow">if</span> parent_name:</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;                    parent_names.insert(0, parent_name)</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;                parent = parent.get_parent()</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;            <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;                <span class="keywordflow">break</span></div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> parent_names:</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;            <span class="keywordflow">return</span> <span class="keywordtype">None</span></div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;            <span class="keywordflow">return</span> <span class="stringliteral">&#39;.&#39;</span>.join(parent_names) </div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;</div>
<div class="line"><a name="l00389"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#aef1d100fe1c668847583366148620873">  389</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aef1d100fe1c668847583366148620873">_get_fully_qualified_name</a>(self):</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;        <span class="stringliteral">&quot;return full parents name + self name (useful as key)&quot;</span></div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;        parent_name = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a311db6e15161ccbe876a1ff7662ba2a2">_get_parent_name</a>()</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> parent_name:</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;            <span class="keywordflow">return</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">_name</a></div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;            <span class="keywordflow">return</span> <span class="stringliteral">&quot;%s.%s&quot;</span> % (parent_name, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">_name</a>)</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;   </div>
<div class="line"><a name="l00397"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#add0ae7d52f03c1a03aea7cc58e868e61">  397</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#add0ae7d52f03c1a03aea7cc58e868e61">_get_name</a>(self):</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;        <span class="keywordflow">return</span> getattr(self, <span class="stringliteral">&quot;_name&quot;</span>, <span class="keywordtype">None</span>)</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    </div>
<div class="line"><a name="l00400"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#af746236f93baeb6dffa429d430be6728">  400</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af746236f93baeb6dffa429d430be6728">_set_name</a>(self, value):</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;        <span class="comment"># check if we&#39;re changing the previous name (ie., design time)</span></div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;        <span class="keywordflow">if</span> hasattr(self, <span class="stringliteral">&quot;_name&quot;</span>):</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;            key = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aef1d100fe1c668847583366148620873">_get_fully_qualified_name</a>()</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;            key = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00406"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">  406</a></span>&#160;        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">_name</a> = value</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;        <span class="comment"># delete old reference (if exists)</span></div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;        <span class="keywordflow">if</span> key <span class="keywordflow">in</span> COMPONENTS:</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;            del COMPONENTS[key]</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;            COMPONENTS[self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aef1d100fe1c668847583366148620873">_get_fully_qualified_name</a>()] = self  </div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;    </div>
<div class="line"><a name="l00413"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a2c6be5dc136f0ada78b1b9c4db6eaabc">  413</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a2c6be5dc136f0ada78b1b9c4db6eaabc">__repr__</a>(   self, prefix=&quot;gui&quot;, parent=&quot;&quot;, indent=0, context=False):</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d9/d90/namespacegui_1_1component.html#ad5c2b0e24b70b06644b3de48659e4231">represent</a>(self, prefix, parent, indent, context)</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;    <span class="comment"># properties:</span></div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;    </div>
<div class="line"><a name="l00418"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a0c19fdbfb03a0b59c1e36e248ef029c4">  418</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a0c19fdbfb03a0b59c1e36e248ef029c4">_getId</a>(self):</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;        <span class="stringliteral">&quot;return the id is generated using NewId by the base wxPython control&quot;</span></div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;        <span class="keywordflow">return</span> self.wx_obj.GetId()</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;</div>
<div class="line"><a name="l00422"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a776fe39f335ec0db8da8a1065adc5a93">  422</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a776fe39f335ec0db8da8a1065adc5a93">_setId</a>(self, id):</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;        <span class="keywordflow">pass</span></div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;        <span class="comment">#raise AttributeError(&quot;id attribute is read-only&quot;)</span></div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;    </div>
<div class="line"><a name="l00426"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#af7da9a2f14096ec1d60c95985541e8d7">  426</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af7da9a2f14096ec1d60c95985541e8d7">_getToolTip</a>(self):</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;        <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;            <span class="keywordflow">return</span> self.wx_obj.GetToolTip().GetTip()</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;        <span class="keywordflow">except</span>:</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;            <span class="keywordflow">return</span> <span class="stringliteral">&quot;&quot;</span></div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    </div>
<div class="line"><a name="l00432"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a28595cf19311a9dc18ae93bf31c066fc">  432</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a28595cf19311a9dc18ae93bf31c066fc">_get_font</a>(self):</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a7422d4b1d8b3973416b46dd67857b751">_font</a> <span class="keywordflow">is</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;            <span class="keywordflow">return</span> <span class="keywordtype">None</span></div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;        wx_font = self.wx_obj.GetFont()</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;        <span class="comment"># sanity check: avoid assertion error:</span></div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> wx_font.IsOk():</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;            wx_font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;        self._font.set_wx_font(wx_font)</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;        <span class="keywordflow">return</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a7422d4b1d8b3973416b46dd67857b751">_font</a></div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;</div>
<div class="line"><a name="l00442"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#abe66de1519e6157fa2bb58828b2690e3">  442</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#abe66de1519e6157fa2bb58828b2690e3">_set_fgcolor</a>(self, color):</div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;        color = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aad59f981ea35d6df7a04cc3f998df702">_get_default_color</a>(color, <span class="stringliteral">&quot;foreground&quot;</span>)</div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;        <span class="comment"># if not color given, avoid change it to wx.NullColor (fix for OSX)</span></div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;        <span class="keywordflow">if</span> color <span class="keywordflow">is</span> <span class="keywordflow">not</span> wx.NullColour:</div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;            self.wx_obj.SetForegroundColour(color)</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;            self.wx_obj.Refresh()   <span class="comment"># KEA wxPython bug?</span></div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#abfd05bb211fa6d33d9d501229068c00b">_fgcolor</a> = <span class="keyword">True</span></div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#abfd05bb211fa6d33d9d501229068c00b">_fgcolor</a> = <span class="keyword">False</span></div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;    </div>
<div class="line"><a name="l00452"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a87cf1202a1dcc65d07253b6c5529e40f">  452</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a87cf1202a1dcc65d07253b6c5529e40f">_set_bgcolor</a>(self, color):</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;        color = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aad59f981ea35d6df7a04cc3f998df702">_get_default_color</a>(color, <span class="stringliteral">&quot;background&quot;</span>)</div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;        <span class="comment"># if not color given, avoid change it to wx.NullColor (fix for OSX)</span></div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;        <span class="keywordflow">if</span> color <span class="keywordflow">is</span> <span class="keywordflow">not</span> wx.NullColour:</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;            self.wx_obj.SetBackgroundColour(color)</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;            self.wx_obj.Refresh()   <span class="comment"># KEA wxPython bug?</span></div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a9e841f80226d6be4dea910847f78b927">_bgcolor</a> = <span class="keyword">True</span></div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#abfd05bb211fa6d33d9d501229068c00b">_fgcolor</a> = <span class="keyword">False</span></div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;</div>
<div class="line"><a name="l00462"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8c230af4fd75f85f8f555bf9a90f469f">  462</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a8c230af4fd75f85f8f555bf9a90f469f">_get_fgcolor</a>(self):</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;        color = self.wx_obj.GetForegroundColour()</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;        <span class="keywordflow">if</span> color:</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;            color = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aad59f981ea35d6df7a04cc3f998df702">_get_default_color</a>(color, <span class="stringliteral">&quot;foreground&quot;</span>)</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;            c = Color(color.Red(), color.Green(), color.Blue(), color.Alpha())</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;            c.default = <span class="keywordflow">not</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#abfd05bb211fa6d33d9d501229068c00b">_fgcolor</a></div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;            <span class="keywordflow">return</span> c</div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;</div>
<div class="line"><a name="l00470"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a1a69c5d9f7d80facc24f0d7d5a80d299">  470</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a1a69c5d9f7d80facc24f0d7d5a80d299">_get_bgcolor</a>(self):</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;        color = self.wx_obj.GetBackgroundColour()</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;        <span class="keywordflow">if</span> color:</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;            color = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aad59f981ea35d6df7a04cc3f998df702">_get_default_color</a>(color, <span class="stringliteral">&quot;background&quot;</span>)</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;            c = Color(color.Red(), color.Green(), color.Blue(), color.Alpha())</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;            c.default = <span class="keywordflow">not</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a9e841f80226d6be4dea910847f78b927">_bgcolor</a></div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;            <span class="keywordflow">return</span> c</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;        </div>
<div class="line"><a name="l00478"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a72e2ac700706106ac8c42000000775b5">  478</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a72e2ac700706106ac8c42000000775b5">_setToolTip</a>(self, aString):</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;        toolTip = wx.ToolTip(aString)</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;        self.wx_obj.SetToolTip(toolTip)</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;    </div>
<div class="line"><a name="l00482"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a7f8e1c39a0868217aa1def6153943e2e">  482</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a7f8e1c39a0868217aa1def6153943e2e">_set_font</a>(self, value):</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;        <span class="keywordflow">if</span> value <span class="keywordflow">is</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a7422d4b1d8b3973416b46dd67857b751">_font</a> = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;            <span class="keywordflow">return</span></div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;        <span class="keywordflow">if</span> isinstance(value, dict):</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a7422d4b1d8b3973416b46dd67857b751">_font</a> = Font(parent=self, **value)</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;        <span class="keywordflow">else</span>: <span class="comment"># Bind the font to this component.</span></div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a7422d4b1d8b3973416b46dd67857b751">_font</a> = value</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;            value._parent = self</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;        self.wx_obj.SetFont( self._font.get_wx_font() )</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;</div>
<div class="line"><a name="l00493"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a19bf8049dd4458d7278daf736d6eed7b">  493</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a19bf8049dd4458d7278daf736d6eed7b">_getUserdata</a>(self):</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;        <span class="keywordflow">return</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a05be9ff400ef105070411cc568639cb1">_userdata</a> </div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;</div>
<div class="line"><a name="l00496"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4351a66d174daec4d6e24ef087536c46">  496</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4351a66d174daec4d6e24ef087536c46">_setUserdata</a>(self, aString):</div>
<div class="line"><a name="l00497"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a05be9ff400ef105070411cc568639cb1">  497</a></span>&#160;        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a05be9ff400ef105070411cc568639cb1">_userdata</a> = aString</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;</div>
<div class="line"><a name="l00499"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#aad59f981ea35d6df7a04cc3f998df702">  499</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aad59f981ea35d6df7a04cc3f998df702">_get_default_color</a>(self, color, context=&quot;background&quot;):</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;        <span class="keywordflow">if</span> color <span class="keywordflow">is</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;            <span class="comment"># warning: NullColour is ignored as it doesn&#39;t work properly in OSX</span></div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;            <span class="comment"># use wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND) instead</span></div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;            c = wx.NullColour</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;            <span class="comment"># KEA 2001-07-27</span></div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;            <span class="comment"># is the right place for this check?</span></div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;            <span class="keywordflow">if</span> isinstance(color, tuple) <span class="keywordflow">and</span> len(color) == 3:</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;                c = Color(color[0], color[1], color[2])</div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;            <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;                <span class="keywordflow">if</span> isinstance(color, basestring):</div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;                    c = wx.NamedColour(color)</div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;                <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;                    c = color</div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;        <span class="keywordflow">return</span> c</div>
<div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;</div>
<div class="line"><a name="l00516"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#aa812f0a51010e748dc107a31e34a7781">  516</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aa812f0a51010e748dc107a31e34a7781">_getEnabled</a>(self):</div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;        <span class="keywordflow">return</span> self.wx_obj.IsEnabled()</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;</div>
<div class="line"><a name="l00519"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#af6865f9100a4237c1ffe6ccd6c720bb4">  519</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af6865f9100a4237c1ffe6ccd6c720bb4">_setEnabled</a>(self, aBoolean):</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;        self.wx_obj.Enable(aBoolean)</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;</div>
<div class="line"><a name="l00522"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a09a4103fece8d89d1a758d40f9ab4c78">  522</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a09a4103fece8d89d1a758d40f9ab4c78">_getVisible</a>(self):</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;        <span class="keywordflow">return</span> self.wx_obj.IsShown()</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;</div>
<div class="line"><a name="l00525"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a445a5f5882038364bc76ed9790ca1428">  525</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a445a5f5882038364bc76ed9790ca1428">_setVisible</a>(self, aBoolean):</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;        <span class="comment"># do not show immediately to allow proper layout and avoid flickering</span></div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;        <span class="keywordflow">if</span> aBoolean <span class="keywordflow">and</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">_parent</a> <span class="keywordflow">is</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;            wx.CallAfter(self.wx_obj.Show)</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;            self.wx_obj.Show(aBoolean)</div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;    </div>
<div class="line"><a name="l00532"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a0fc90ac29b4b9a361dec93202bc8444a">  532</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a0fc90ac29b4b9a361dec93202bc8444a">_get_drop_target</a>(self):</div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;        <span class="comment"># dt is a special case because the original wx_obj could be destroyed</span></div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;        <span class="keywordflow">return</span> hasattr(self, <span class="stringliteral">&quot;_drop_target&quot;</span>) <span class="keywordflow">and</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aa93690dc156721aa95e191ecafd1f940">_drop_target</a> <span class="keywordflow">or</span> <span class="keywordtype">None</span></div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;    </div>
<div class="line"><a name="l00536"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a9410e5de2d11e2deea2b761b86500c48">  536</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a9410e5de2d11e2deea2b761b86500c48">_set_drop_target</a>(self, dt):</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;        <span class="comment"># discard previous drop target, as it is associated to the old wx_obj!</span></div>
<div class="line"><a name="l00538"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a616c61e7b744eb5b81c890bdb0d1254d">  538</a></span>&#160;        <span class="keywordflow">if</span> dt <span class="keywordflow">and</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#ab3281867fe2a98d3bc5efa490b3ee61a">drop_target</a> == dt:</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;            dt = dt.copy()                  <span class="comment"># create a copy to avoid wx problems</span></div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;        old_dt = getattr(self, <span class="stringliteral">&quot;_drop_target&quot;</span>, <span class="keywordtype">None</span>)    </div>
<div class="line"><a name="l00541"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#aa93690dc156721aa95e191ecafd1f940">  541</a></span>&#160;        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aa93690dc156721aa95e191ecafd1f940">_drop_target</a> = dt</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;        <span class="keywordflow">if</span> (old_dt <span class="keywordflow">or</span> dt) <span class="keywordflow">and</span> hasattr(self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">wx_obj</a>, <span class="stringliteral">&quot;SetDropTarget&quot;</span>):</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;            self.wx_obj.SetDropTarget(dt)</div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;</div>
<div class="line"><a name="l00546"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a814a311328f2d8bb6fa6c9db969725ef">  546</a></span>&#160;    name = InitSpec(_get_name, _set_name, optional=<span class="keyword">False</span>, _name=<span class="stringliteral">&quot;_name&quot;</span>, default=<span class="stringliteral">&quot;&quot;</span>, type=<span class="stringliteral">&#39;string&#39;</span>)</div>
<div class="line"><a name="l00547"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a899136d1163a86e15e07266ad24e535e">  547</a></span>&#160;    bgcolor = Spec(_get_bgcolor, _set_bgcolor, type=<span class="stringliteral">&#39;colour&#39;</span>)</div>
<div class="line"><a name="l00548"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a216b49d7991266fbdf6bd44725e60d81">  548</a></span>&#160;    font = Spec(_get_font, _set_font, type=<span class="stringliteral">&#39;font&#39;</span>)</div>
<div class="line"><a name="l00549"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4ff9d2f60cc7dcac1e7ef4555b89fb97">  549</a></span>&#160;    fgcolor = Spec(_get_fgcolor, _set_fgcolor, type=<span class="stringliteral">&#39;colour&#39;</span>)</div>
<div class="line"><a name="l00550"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#aec69481c608a74df72f198a26c50a676">  550</a></span>&#160;    enabled = Spec(_getEnabled, _setEnabled, default=<span class="keyword">True</span>, type=<span class="stringliteral">&#39;boolean&#39;</span>)</div>
<div class="line"><a name="l00551"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#aeb8eab41d41580e36d640091ca8abcd4">  551</a></span>&#160;    id = InitSpec(_getId, _setId,  default=-1, type=<span class="stringliteral">&quot;integer&quot;</span>)</div>
<div class="line"><a name="l00552"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a17e83512a63520f0ec98ebbaa57219f0">  552</a></span>&#160;    helptext = Spec(optional=<span class="keyword">True</span>, type=<span class="stringliteral">&quot;string&quot;</span>)</div>
<div class="line"><a name="l00553"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#af17864b477e0460b33cd963aa65446e9">  553</a></span>&#160;    tooltip = Spec(_getToolTip, _setToolTip, default=<span class="stringliteral">&#39;&#39;</span>, type=<span class="stringliteral">&quot;string&quot;</span>)</div>
<div class="line"><a name="l00554"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a5e1663becc28aa87a15d7e9cadb3beed">  554</a></span>&#160;    visible = Spec(_getVisible, _setVisible, default=<span class="keyword">True</span>, type=<span class="stringliteral">&#39;boolean&#39;</span>)</div>
<div class="line"><a name="l00555"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#ae64a95ff42663253d8de51c3640ace53">  555</a></span>&#160;    userdata = Spec(_name=<span class="stringliteral">&#39;_userdata&#39;</span>)</div>
<div class="line"><a name="l00556"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a32e7774708f187eb526477a441a66f6b">  556</a></span>&#160;    parent = Spec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a311db6e15161ccbe876a1ff7662ba2a2">_get_parent_name</a>(), </div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;                      optional=<span class="keyword">False</span>, default=<span class="stringliteral">&quot;&quot;</span>,</div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;                      doc=<span class="stringliteral">&quot;parent window (used internally)&quot;</span>)</div>
<div class="line"><a name="l00559"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#ab3281867fe2a98d3bc5efa490b3ee61a">  559</a></span>&#160;    drop_target = InternalSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a0fc90ac29b4b9a361dec93202bc8444a">_get_drop_target</a>(), </div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;                               <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a9410e5de2d11e2deea2b761b86500c48">_set_drop_target</a>(value), </div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;                               doc=<span class="stringliteral">&quot;drag&amp;drop handler (used in design mode)&quot;</span>, </div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;                               type=<span class="stringliteral">&#39;internal&#39;</span>)</div>
<div class="line"><a name="l00563"></a><span class="lineno"><a class="line" href="../../d7/d98/classgui_1_1component_1_1Component.html#a81c0e3b51178602f9b974a48dc554514">  563</a></span>&#160;    index = Spec(reindex, reindex, type=<span class="stringliteral">&quot;integer&quot;</span>, default=<span class="keywordtype">None</span>,</div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;                 doc=<span class="stringliteral">&quot;Z Order (overlapping) / Tab Order (Tabbing navigation)&quot;</span>)</div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;</div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;</div>
<div class="line"><a name="l00567"></a><span class="lineno"><a class="line" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html">  567</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html">DesignerMixin</a>(object):</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;    <span class="stringliteral">&quot;Designer support&quot;</span></div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;</div>
<div class="line"><a name="l00570"></a><span class="lineno"><a class="line" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a381c6a319b2f3fbf4c6f3e910ff4521d">  570</a></span>&#160;    __metaclass__ = ComponentBase</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;</div>
<div class="line"><a name="l00572"></a><span class="lineno"><a class="line" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a0f07c4b7d463f32232528125b49fc449">  572</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a0f07c4b7d463f32232528125b49fc449">_set_designer</a>(self, func):</div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;binding designer handler...&quot;</span>, func, self._meta.name</div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;        <span class="keywordflow">if</span> func:</div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;            <span class="comment"># connect the mouse event handler of the designer:</span></div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;            self.wx_obj.Bind(wx.EVT_MOUSE_EVENTS, func)</div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;            <span class="comment"># link menu selection (click) to the designer</span></div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;            self.wx_obj.Bind(wx.EVT_MENU, func)</div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;            <span class="comment"># link key press event to the designer (move)</span></div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;            self.wx_obj.Bind(wx.EVT_KEY_DOWN, func)</div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;            self.wx_obj.Bind(wx.EVT_KEY_UP, func)</div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;            <span class="comment"># bind top level window resizing and closing event:</span></div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;            <span class="keywordflow">if</span> self._parent <span class="keywordflow">is</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;                self.wx_obj.Bind(wx.EVT_SIZE, func, self.wx_obj)</div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;                self.wx_obj.Bind(wx.EVT_CLOSE, func, self.wx_obj)</div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;                <span class="comment"># link repaint event (refresh) to the designer (draw grid)</span></div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;                self.wx_obj.Bind(wx.EVT_PAINT, func, self.wx_obj)</div>
<div class="line"><a name="l00588"></a><span class="lineno"><a class="line" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#acc40627321b60dd37b02eb1fa05894af">  588</a></span>&#160;            self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#acc40627321b60dd37b02eb1fa05894af">_designer</a> = func</div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;            <span class="keywordflow">for</span> child <span class="keywordflow">in</span> self:</div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;                child.designer = func</div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;</div>
<div class="line"><a name="l00592"></a><span class="lineno"><a class="line" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a26c41232d343c0bc5229da935da7ad31">  592</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a26c41232d343c0bc5229da935da7ad31">snapshot</a>(self):</div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;        <span class="stringliteral">&quot;Capture the screen appearance of the control (to be used as facade)&quot;</span></div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;        width, height = self.wx_obj.GetSize()</div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;        bmp = wx.EmptyBitmap(width, height)</div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;        wdc = wx.ClientDC(self.wx_obj)</div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;        mdc = wx.MemoryDC(bmp)</div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;        mdc.Blit(0, 0, width, height, wdc, 0, 0)</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;        <span class="comment">#bmp.SaveFile(&quot;test.bmp&quot;, wx.BITMAP_TYPE_BMP)</span></div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;        wdc.Destroy()</div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;        mdc.Destroy()</div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;        <span class="keywordflow">return</span> bmp</div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;</div>
<div class="line"><a name="l00604"></a><span class="lineno"><a class="line" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a901b2ef5e3e6b947f0c5a8cc57ec9210">  604</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a901b2ef5e3e6b947f0c5a8cc57ec9210">_set_facade</a>(self, Facade):</div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;setting facade...&quot;</span>, self._meta.name</div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;        <span class="keywordflow">if</span> hasattr(self, <span class="stringliteral">&quot;_facade&quot;</span>) <span class="keywordflow">and</span> self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#af6fd0f04305fba59d556b2e3e71f7574">_facade</a>:</div>
<div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;            self._facade.destroy()</div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;        <span class="comment"># only set facade if it is a Class (not instantiated)</span></div>
<div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;        <span class="keywordflow">if</span> Facade <span class="keywordflow">and</span> callable(Facade):</div>
<div class="line"><a name="l00610"></a><span class="lineno"><a class="line" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#af6fd0f04305fba59d556b2e3e71f7574">  610</a></span>&#160;            self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#af6fd0f04305fba59d556b2e3e71f7574">_facade</a> = Facade(self._parent.wx_obj, obj=self, )</div>
<div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;            self._facade.Bind(wx.EVT_MOUSE_EVENTS, self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a6cf9c184680c89aeba622e24cda72529">designer</a>)</div>
<div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;            self._facade.Show()</div>
<div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;            self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#af6fd0f04305fba59d556b2e3e71f7574">_facade</a> = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;</div>
<div class="line"><a name="l00616"></a><span class="lineno"><a class="line" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a004f92183b676666efbdddcd4bab824d">  616</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a004f92183b676666efbdddcd4bab824d">rebuild</a>(self, **kwargs):</div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;        super(DesignerMixin, self).<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a004f92183b676666efbdddcd4bab824d">rebuild</a>(**kwargs)</div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;        <span class="comment"># refresh the fake image screenshot (if used as facade):</span></div>
<div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;        <span class="keywordflow">if</span> self._meta.facade <span class="keywordflow">and</span> self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a5a74dc3d6f623c6e8c2a4617774c41ce">facade</a>:</div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;            self.facade.update()</div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;</div>
<div class="line"><a name="l00622"></a><span class="lineno"><a class="line" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a6cf9c184680c89aeba622e24cda72529">  622</a></span>&#160;    designer = InternalSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#acc40627321b60dd37b02eb1fa05894af">_designer</a>, </div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;                            <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a0f07c4b7d463f32232528125b49fc449">_set_designer</a>(value), </div>
<div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;                            doc=<span class="stringliteral">&quot;function to handle events in design mode&quot;</span>, </div>
<div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;                            type=<span class="stringliteral">&#39;internal&#39;</span>)</div>
<div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;</div>
<div class="line"><a name="l00627"></a><span class="lineno"><a class="line" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a5a74dc3d6f623c6e8c2a4617774c41ce">  627</a></span>&#160;    facade = InternalSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#af6fd0f04305fba59d556b2e3e71f7574">_facade</a>, </div>
<div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;                            <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a901b2ef5e3e6b947f0c5a8cc57ec9210">_set_facade</a>(value), </div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;                            doc=<span class="stringliteral">&quot;fake static superficial object in design mode&quot;</span>, </div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;                            type=<span class="stringliteral">&#39;internal&#39;</span>)</div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;</div>
<div class="line"><a name="l00632"></a><span class="lineno"><a class="line" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a98bb76cf072254249cbe6b0b34b84e66">  632</a></span>&#160;    sel_marker = InternalSpec(_name=<span class="stringliteral">&quot;_sel_marker&quot;</span>,</div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;                              doc=<span class="stringliteral">&quot;selection marker in design mode&quot;</span>, </div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;                              type=<span class="stringliteral">&#39;internal&#39;</span>)</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;</div>
<div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;</div>
<div class="line"><a name="l00637"></a><span class="lineno"><a class="line" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html">  637</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html">SizerMixin</a>(object):</div>
<div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;    <span class="stringliteral">&quot;Automatic layout &amp; sizing support&quot;</span></div>
<div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;</div>
<div class="line"><a name="l00640"></a><span class="lineno"><a class="line" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#aee3b2e0f2f2e894aae9f06c65f5216e3">  640</a></span>&#160;    __metaclass__ = ComponentBase</div>
<div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;</div>
<div class="line"><a name="l00642"></a><span class="lineno"><a class="line" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a75ee983eb8e5bef7bbbc324e7edfbc2c">  642</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a75ee983eb8e5bef7bbbc324e7edfbc2c">_set_sizer</a>(self, enabled):</div>
<div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;set sizer&quot;</span>, enabled, self._meta.name        </div>
<div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;        <span class="keywordflow">if</span> enabled:</div>
<div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;            <span class="comment"># create a new sizer (flow / fluid) layout (requires wxPython 2.9)</span></div>
<div class="line"><a name="l00646"></a><span class="lineno"><a class="line" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a9ba0405f06664883a262906c8a8ec0bf">  646</a></span>&#160;            self.<a class="code" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a9ba0405f06664883a262906c8a8ec0bf">_sizer</a> = <a class="code" href="../../d9/d90/namespacegui_1_1component.html#acbdd7327932847cde657f8cac3613ccf">wx_WrapSizer</a>()</div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;            self.wx_obj.SetSizer(self.<a class="code" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a9ba0405f06664883a262906c8a8ec0bf">_sizer</a>)</div>
<div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;            <span class="comment"># add all the children to the sizer (in case we&#39;re on design time):</span></div>
<div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;            <span class="keywordflow">for</span> child <span class="keywordflow">in</span> self:</div>
<div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;                self.<a class="code" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#af253e2a63882069e771a85a12241cc56">_sizer_add</a>(child)</div>
<div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;        <span class="keywordflow">elif</span> hasattr(self, <span class="stringliteral">&quot;_sizer&quot;</span>):</div>
<div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;            <span class="comment"># remove the sizer</span></div>
<div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;            self.wx_obj.SetSizer(<span class="keywordtype">None</span>)</div>
<div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;            del self.<a class="code" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a9ba0405f06664883a262906c8a8ec0bf">_sizer</a></div>
<div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;</div>
<div class="line"><a name="l00656"></a><span class="lineno"><a class="line" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a0fb44b09a9df40c0c53fd45e81534c29">  656</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a0fb44b09a9df40c0c53fd45e81534c29">_get_sizer</a>(self):</div>
<div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;        <span class="keywordflow">if</span> hasattr(self, <span class="stringliteral">&quot;_sizer&quot;</span>):</div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">True</span></div>
<div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">False</span></div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;</div>
<div class="line"><a name="l00662"></a><span class="lineno"><a class="line" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#af253e2a63882069e771a85a12241cc56">  662</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#af253e2a63882069e771a85a12241cc56">_sizer_add</a>(self, child):</div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;        <span class="stringliteral">&quot;called when adding a control to the window&quot;</span></div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a1ec131f2e0f74b86e02c8f82b4e18378">sizer</a>:</div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;            <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;adding to sizer:&quot;</span>, child.name</div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;            <span class="comment"># TODO: determine the combination of sides (wx.ALL now)</span></div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;            border = max(child.margin_left, child.margin_right,</div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;                         child.margin_top, child.margin_bottom)</div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;            <span class="keywordflow">if</span> <span class="keywordflow">not</span> border:</div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;                border = child.sizer_border</div>
<div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;            flags = wx.ALL</div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;            <span class="keywordflow">if</span> child.sizer_align:</div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;                flags |= child._sizer_align </div>
<div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;            self._sizer.Add(child.wx_obj, 0, flags, border)</div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;</div>
<div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;</div>
<div class="line"><a name="l00677"></a><span class="lineno"><a class="line" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a1ec131f2e0f74b86e02c8f82b4e18378">  677</a></span>&#160;    sizer = DimensionSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a0fb44b09a9df40c0c53fd45e81534c29">_get_sizer</a>(), </div>
<div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;                 <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a75ee983eb8e5bef7bbbc324e7edfbc2c">_set_sizer</a>(value), group=<span class="stringliteral">&quot;sizer&quot;</span>,</div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;                 doc=<span class="stringliteral">&quot;use an automatic flow layout mechanism (wx.WrapSizer)&quot;</span>, </div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;                 type=<span class="stringliteral">&#39;boolean&#39;</span>, default=<span class="keyword">False</span>)</div>
<div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;</div>
<div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;</div>
<div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;   </div>
<div class="line"><a name="l00684"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html">  684</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html">ControlSuper</a>(<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html">DesignerMixin</a>, <a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html">Component</a>):</div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;    <span class="stringliteral">&quot;This is the base class for a control and top level windows&quot;</span></div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;</div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;    <span class="comment"># A control is generally a small window which processes user input and/or </span></div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;    <span class="comment"># displays one or more item of data (for more info see wx.Control)</span></div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;    <span class="comment"># Avoid the term &#39;widget&#39; as could be confusing (and it is already used in </span></div>
<div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;    <span class="comment"># web2py)</span></div>
<div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;    </div>
<div class="line"><a name="l00692"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ae18399fb19c36aaa558eae4b194e3b14">  692</a></span>&#160;    _registry = registry.CONTROLS</div>
<div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;</div>
<div class="line"><a name="l00694"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ace3b877725a11c910667016dc2781748">  694</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ace3b877725a11c910667016dc2781748">__init__</a>(self, parent=None, **kwargs):        </div>
<div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;        <span class="comment"># set safe initial dimensions</span></div>
<div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> hasattr(self, <span class="stringliteral">&#39;_resizable&#39;</span>):</div>
<div class="line"><a name="l00697"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#af529a328ae490465496ad40a4097ea0d">  697</a></span>&#160;            self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#af529a328ae490465496ad40a4097ea0d">_resizable</a> = kwargs.get(<span class="stringliteral">&#39;resizable&#39;</span>, <span class="keyword">True</span>)</div>
<div class="line"><a name="l00698"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ada6520da873ce59d102c930582ee85b0">  698</a></span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a83bf6108298ad8d8e8febed78237261a">_left</a> = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#ab1d4f5cb9769d145ebf1f1db21f5b9aa">_top</a> = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af58429399152c275ceb33ed4e99ffe3d">_width</a> = self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aee407093fea1b51db38cf665dfd18003">_height</a> = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00699"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7c21f30ba7fa9f98d28ddec39eef006f">  699</a></span>&#160;            self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7c21f30ba7fa9f98d28ddec39eef006f">_margins</a> = [0] * 4  <span class="comment"># left, top, right, bottom</span></div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;        <span class="comment"># call default contructor</span></div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;        Component.__init__(self, parent, **kwargs) </div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;        <span class="comment"># Handle resize events to adjust absolute and relative dimensions</span></div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#af529a328ae490465496ad40a4097ea0d">_resizable</a>:</div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;            <span class="comment"># postpone this so it doesn&#39;t catch initialization events:</span></div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;            wx.CallAfter(self.wx_obj.Bind, wx.EVT_SIZE, self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aa777e42e418b9e9517dcd4aae5cf1430">resize</a>)</div>
<div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;</div>
<div class="line"><a name="l00707"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ae92b3961491af2a2273baa295b8e1e4a">  707</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ae92b3961491af2a2273baa295b8e1e4a">set_parent</a>(self, new_parent, init=False):</div>
<div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;        <span class="stringliteral">&quot;Re-parent a child control with the new wx_obj parent&quot;</span></div>
<div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;        Component.set_parent(self, new_parent, init)</div>
<div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;        <span class="comment"># if not called from constructor, we must also reparent in wx:</span></div>
<div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> init:</div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;            <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;reparenting&quot;</span>, ctrl.name</div>
<div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;            <span class="keywordflow">if</span> hasattr(self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">wx_obj</a>, <span class="stringliteral">&quot;Reparent&quot;</span>):</div>
<div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;                self.wx_obj.Reparent(self._parent.wx_obj)</div>
<div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;</div>
<div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;    <span class="comment"># Dimensions:</span></div>
<div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;</div>
<div class="line"><a name="l00718"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a9faae286a706388b11b9debdf4daf39a">  718</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a9faae286a706388b11b9debdf4daf39a">_calc_dimension</a>(self, dim_val, dim_max, font_dim):</div>
<div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;        <span class="stringliteral">&quot;Calculate final pos and size (auto, absolute in pixels &amp; relativa)&quot;</span></div>
<div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;        <span class="keywordflow">if</span> dim_val <span class="keywordflow">is</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;            <span class="keywordflow">return</span> -1   <span class="comment"># let wx automatic pos/size</span></div>
<div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;        <span class="keywordflow">elif</span> isinstance(dim_val, int):</div>
<div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;            <span class="keywordflow">return</span> dim_val  <span class="comment"># use fixed pixel value (absolute)</span></div>
<div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;        <span class="keywordflow">elif</span> isinstance(dim_val, basestring):</div>
<div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;            <span class="keywordflow">if</span> dim_val.endswith(<span class="stringliteral">&quot;%&quot;</span>):</div>
<div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;                <span class="comment"># percentaje, relative to parent max size:</span></div>
<div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;                dim_val = int(dim_val[:-1])</div>
<div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;                dim_val = dim_val / 100.0 * dim_max</div>
<div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;            <span class="keywordflow">elif</span> dim_val.endswith(<span class="stringliteral">&quot;em&quot;</span>):</div>
<div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;                <span class="comment"># use current font size (suport fractions):</span></div>
<div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;                dim_val = float(dim_val[:-2])</div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;                dim_val = dim_val * font_dim</div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;            <span class="keywordflow">elif</span> dim_val.endswith(<span class="stringliteral">&quot;px&quot;</span>):</div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;                <span class="comment"># fixed pixels</span></div>
<div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;                dim_val = dim_val[:-2]</div>
<div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;            <span class="keywordflow">elif</span> dim_val == <span class="stringliteral">&quot;&quot;</span> <span class="keywordflow">or</span> dim_val == <span class="stringliteral">&quot;auto&quot;</span>:</div>
<div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;                dim_val = -1</div>
<div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;            <span class="keywordflow">return</span> int(dim_val)                        </div>
<div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;    </div>
<div class="line"><a name="l00740"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7c87cb830ddcb27f667a466ad28c0a94">  740</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7c87cb830ddcb27f667a466ad28c0a94">_get_pos</a>(self):</div>
<div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;        <span class="comment"># get the actual position, not (-1, -1)</span></div>
<div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;        <span class="keywordflow">return</span> tuple(self.wx_obj.GetPosition())</div>
<div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;</div>
<div class="line"><a name="l00744"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aadd45821f352e5df10edc11a9e609105">  744</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aadd45821f352e5df10edc11a9e609105">_set_pos</a>(self, point):</div>
<div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;        <span class="comment"># check parameters (and store user values for resize)</span></div>
<div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;        point = list(point)</div>
<div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;        <span class="comment"># get parent or screen size (used to calc the percent)</span></div>
<div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a32e7774708f187eb526477a441a66f6b">parent</a> <span class="keywordflow">and</span> self.wx_obj.GetParent():</div>
<div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;            parent_size = self.wx_obj.GetParent().GetSize()</div>
<div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;            parent_size = wx.DisplaySize()</div>
<div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;        <span class="comment"># get font metrics for &quot;em&quot; unit</span></div>
<div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;        font_width = self.wx_obj.GetCharWidth()</div>
<div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;        font_height = self.wx_obj.GetCharHeight()</div>
<div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;        <span class="comment"># get current position:</span></div>
<div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;        x, y = self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7c87cb830ddcb27f667a466ad28c0a94">_get_pos</a>()</div>
<div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;        <span class="comment"># calculate actual position (auto, relative or absolute)</span></div>
<div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;        <span class="keywordflow">if</span> point[0] <span class="keywordflow">is</span> <span class="keywordflow">not</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;            x = self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a9faae286a706388b11b9debdf4daf39a">_calc_dimension</a>(point[0], parent_size[0], font_width) \</div>
<div class="line"><a name="l00760"></a><span class="lineno">  760</span>&#160;                    + self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a067b3e4f00ead528f81de3fa26091674">margin_left</a></div>
<div class="line"><a name="l00761"></a><span class="lineno">  761</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a83bf6108298ad8d8e8febed78237261a">_left</a> = str(point[0])</div>
<div class="line"><a name="l00762"></a><span class="lineno">  762</span>&#160;        <span class="keywordflow">if</span> point[1] <span class="keywordflow">is</span> <span class="keywordflow">not</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00763"></a><span class="lineno">  763</span>&#160;            y = self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a9faae286a706388b11b9debdf4daf39a">_calc_dimension</a>(point[1], parent_size[1], font_height) \</div>
<div class="line"><a name="l00764"></a><span class="lineno">  764</span>&#160;                    + self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a8ad2d0f13c5877defe52377e9f32a187">margin_top</a></div>
<div class="line"><a name="l00765"></a><span class="lineno">  765</span>&#160;            self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#ab1d4f5cb9769d145ebf1f1db21f5b9aa">_top</a> = str(point[1])</div>
<div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;        <span class="comment"># actually move the object</span></div>
<div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;        self.wx_obj.Move((x, y))</div>
<div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;        <span class="comment"># update the designer selection marker (if any)</span></div>
<div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;        <span class="keywordflow">if</span> hasattr(self, <span class="stringliteral">&#39;sel_marker&#39;</span>) <span class="keywordflow">and</span> self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a98bb76cf072254249cbe6b0b34b84e66">sel_marker</a>:</div>
<div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;            self.sel_marker.update()</div>
<div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;        <span class="keywordflow">if</span> hasattr(self, <span class="stringliteral">&#39;facade&#39;</span>) <span class="keywordflow">and</span> self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a5a74dc3d6f623c6e8c2a4617774c41ce">facade</a>:</div>
<div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;            self.facade.update()</div>
<div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;</div>
<div class="line"><a name="l00774"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#affbafdf05c45ddd850c9ee6f6ac067e6">  774</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#affbafdf05c45ddd850c9ee6f6ac067e6">_set_left</a>(self, value):</div>
<div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;        self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aadd45821f352e5df10edc11a9e609105">_set_pos</a>([value, <span class="keywordtype">None</span>])</div>
<div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;</div>
<div class="line"><a name="l00777"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#abaa2cd80a892a4933aea479a7a97c093">  777</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#abaa2cd80a892a4933aea479a7a97c093">_set_top</a>(self, value):</div>
<div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;        self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aadd45821f352e5df10edc11a9e609105">_set_pos</a>([<span class="keywordtype">None</span>, value])</div>
<div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160;        </div>
<div class="line"><a name="l00780"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ad712fca170ef6df1933a3601023075ba">  780</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ad712fca170ef6df1933a3601023075ba">_get_size</a>(self):</div>
<div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;        <span class="comment"># return the actual size, not (-1, -1)</span></div>
<div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;        <span class="keywordflow">if</span> isinstance(self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">wx_obj</a>, wx.TopLevelWindow):</div>
<div class="line"><a name="l00783"></a><span class="lineno">  783</span>&#160;            <span class="keywordflow">return</span> tuple(self.wx_obj.GetClientSize())</div>
<div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;            <span class="keywordflow">return</span> tuple(self.wx_obj.GetSize())</div>
<div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;</div>
<div class="line"><a name="l00787"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a79f0952c8c1e9e639e219c97944a1147">  787</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a79f0952c8c1e9e639e219c97944a1147">_set_size</a>(self, size, new_size=None):</div>
<div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;SET SIZE&quot;</span>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">_name</a>, size, new_size</div>
<div class="line"><a name="l00789"></a><span class="lineno">  789</span>&#160;        <span class="comment"># check parameters (and store user values for resize)</span></div>
<div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;        size = list(size)</div>
<div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;        <span class="comment"># get parent or screen size (used to calc the percent)</span></div>
<div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;        <span class="keywordflow">if</span> new_size:</div>
<div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;            parent_size = new_size  <span class="comment"># use event size instead</span></div>
<div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;        <span class="keywordflow">elif</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a32e7774708f187eb526477a441a66f6b">parent</a> <span class="keywordflow">and</span> self.wx_obj.GetParent():</div>
<div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;            parent_size = self.wx_obj.GetParent().GetSize()</div>
<div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;            parent_size = wx.DisplaySize()</div>
<div class="line"><a name="l00798"></a><span class="lineno">  798</span>&#160;        <span class="comment"># get font metrics for &quot;em&quot; unit</span></div>
<div class="line"><a name="l00799"></a><span class="lineno">  799</span>&#160;        font_width = self.wx_obj.GetCharWidth()</div>
<div class="line"><a name="l00800"></a><span class="lineno">  800</span>&#160;        font_height = self.wx_obj.GetCharHeight()</div>
<div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160;        <span class="comment"># get current size (to use if a dimension has not changed)</span></div>
<div class="line"><a name="l00802"></a><span class="lineno">  802</span>&#160;        prev_size = self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ad712fca170ef6df1933a3601023075ba">_get_size</a>()</div>
<div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;        <span class="comment"># calculate actual position (auto, relative or absolute)</span></div>
<div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;        <span class="keywordflow">if</span> size[0] <span class="keywordflow">is</span> <span class="keywordflow">not</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160;            w = self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a9faae286a706388b11b9debdf4daf39a">_calc_dimension</a>(size[0], parent_size[0], font_width) \</div>
<div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160;                    - self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a067b3e4f00ead528f81de3fa26091674">margin_left</a> - self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a51646b033b8051928dc38991c3df1593">margin_right</a></div>
<div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;            w = prev_size[0]</div>
<div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;        <span class="keywordflow">if</span> size[1] <span class="keywordflow">is</span> <span class="keywordflow">not</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160;            h = self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a9faae286a706388b11b9debdf4daf39a">_calc_dimension</a>(size[1], parent_size[1], font_height) \</div>
<div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160;                    - self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a8ad2d0f13c5877defe52377e9f32a187">margin_top</a> - self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a99163a2fe83972b5e624f751c14c8edc">margin_bottom</a></div>
<div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00813"></a><span class="lineno">  813</span>&#160;            h = prev_size[1]</div>
<div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160;        <span class="comment"># on windows set the client size (ignore title bar)</span></div>
<div class="line"><a name="l00815"></a><span class="lineno">  815</span>&#160;        <span class="comment"># note: don&#39;t do on controls (it doesn&#39;t work at least for textbox)</span></div>
<div class="line"><a name="l00816"></a><span class="lineno">  816</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;NEWSIZE&quot;</span>, w, h</div>
<div class="line"><a name="l00817"></a><span class="lineno">  817</span>&#160;        <span class="keywordflow">if</span> isinstance(self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">wx_obj</a>, wx.TopLevelWindow):</div>
<div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160;            self.wx_obj.SetClientSize((w, h))</div>
<div class="line"><a name="l00819"></a><span class="lineno">  819</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160;            self.wx_obj.SetSize((w, h))</div>
<div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;            self.wx_obj.SetMinSize((w, h))  <span class="comment"># needed for sizers</span></div>
<div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;        <span class="comment"># update the designer selection marker (if any)</span></div>
<div class="line"><a name="l00823"></a><span class="lineno">  823</span>&#160;        <span class="keywordflow">if</span> hasattr(self, <span class="stringliteral">&#39;sel_marker&#39;</span>) <span class="keywordflow">and</span> self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a98bb76cf072254249cbe6b0b34b84e66">sel_marker</a>:</div>
<div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;            self.sel_marker.update()</div>
<div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;        <span class="keywordflow">if</span> hasattr(self, <span class="stringliteral">&#39;facade&#39;</span>) <span class="keywordflow">and</span> self.<a class="code" href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a5a74dc3d6f623c6e8c2a4617774c41ce">facade</a>:</div>
<div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;            self.facade.update()</div>
<div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;</div>
<div class="line"><a name="l00828"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a2e83ac3b6fe325c0ec3dc76b9b6cbc73">  828</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a2e83ac3b6fe325c0ec3dc76b9b6cbc73">_set_width</a>(self, value):</div>
<div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;SET WIDTH&quot;</span>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">_name</a>, value</div>
<div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160;        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af58429399152c275ceb33ed4e99ffe3d">_width</a> = str(value)</div>
<div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;        self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a79f0952c8c1e9e639e219c97944a1147">_set_size</a>([value, <span class="keywordtype">None</span>])</div>
<div class="line"><a name="l00832"></a><span class="lineno">  832</span>&#160;        </div>
<div class="line"><a name="l00833"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a5d8a866e98fee78e792a4a821ad2ba8c">  833</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a5d8a866e98fee78e792a4a821ad2ba8c">_set_height</a>(self, value):</div>
<div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;SET HEIGHT&quot;</span>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">_name</a>, value</div>
<div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;        self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aee407093fea1b51db38cf665dfd18003">_height</a> = str(value)</div>
<div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;        self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a79f0952c8c1e9e639e219c97944a1147">_set_size</a>([<span class="keywordtype">None</span>, value])</div>
<div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;        </div>
<div class="line"><a name="l00838"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7d5ce0fc0165e6c410ce84e1cfad021e">  838</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7d5ce0fc0165e6c410ce84e1cfad021e">_get_margin</a>(self, index):</div>
<div class="line"><a name="l00839"></a><span class="lineno">  839</span>&#160;        <span class="keywordflow">return</span> self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7c21f30ba7fa9f98d28ddec39eef006f">_margins</a>[index] <span class="keywordflow">or</span> 0</div>
<div class="line"><a name="l00840"></a><span class="lineno">  840</span>&#160;    </div>
<div class="line"><a name="l00841"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a17fb25dd4c1b68f28fc239d2ab5d3e0c">  841</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a17fb25dd4c1b68f28fc239d2ab5d3e0c">_set_margin</a>(self, value, index):</div>
<div class="line"><a name="l00842"></a><span class="lineno">  842</span>&#160;        old_margin = self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7c21f30ba7fa9f98d28ddec39eef006f">_margins</a>[index]</div>
<div class="line"><a name="l00843"></a><span class="lineno">  843</span>&#160;        self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7c21f30ba7fa9f98d28ddec39eef006f">_margins</a>[index] = value</div>
<div class="line"><a name="l00844"></a><span class="lineno">  844</span>&#160;        <span class="keywordflow">if</span> old_margin != value <span class="keywordflow">and</span> value <span class="keywordflow">is</span> <span class="keywordflow">not</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00845"></a><span class="lineno">  845</span>&#160;            self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aa777e42e418b9e9517dcd4aae5cf1430">resize</a>()</div>
<div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;</div>
<div class="line"><a name="l00847"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aa777e42e418b9e9517dcd4aae5cf1430">  847</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aa777e42e418b9e9517dcd4aae5cf1430">resize</a>(self, evt=None):</div>
<div class="line"><a name="l00848"></a><span class="lineno">  848</span>&#160;        <span class="stringliteral">&quot;automatically adjust relative pos and size of children controls&quot;</span></div>
<div class="line"><a name="l00849"></a><span class="lineno">  849</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;RESIZE!&quot;</span>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a814a311328f2d8bb6fa6c9db969725ef">name</a>, self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a8770ad042011a483d2dc29da4c5fd48c">width</a>, self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a06e3511fc8b0141f2b6323e2037578b4">height</a></div>
<div class="line"><a name="l00850"></a><span class="lineno">  850</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> isinstance(self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">wx_obj</a>, wx.TopLevelWindow):</div>
<div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;            <span class="comment"># check that size and pos is relative, then resize/move</span></div>
<div class="line"><a name="l00852"></a><span class="lineno">  852</span>&#160;            <span class="keywordflow">if</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a83bf6108298ad8d8e8febed78237261a">_left</a> <span class="keywordflow">and</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a83bf6108298ad8d8e8febed78237261a">_left</a>[-1] == <span class="stringliteral">&quot;%&quot;</span> <span class="keywordflow">or</span> \</div>
<div class="line"><a name="l00853"></a><span class="lineno">  853</span>&#160;               self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#ab1d4f5cb9769d145ebf1f1db21f5b9aa">_top</a> <span class="keywordflow">and</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#ab1d4f5cb9769d145ebf1f1db21f5b9aa">_top</a>[-1] == <span class="stringliteral">&quot;%&quot;</span>:</div>
<div class="line"><a name="l00854"></a><span class="lineno">  854</span>&#160;                <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;MOVING&quot;</span>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a814a311328f2d8bb6fa6c9db969725ef">name</a>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af58429399152c275ceb33ed4e99ffe3d">_width</a></div>
<div class="line"><a name="l00855"></a><span class="lineno">  855</span>&#160;                self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aadd45821f352e5df10edc11a9e609105">_set_pos</a>((self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a83bf6108298ad8d8e8febed78237261a">_left</a>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#ab1d4f5cb9769d145ebf1f1db21f5b9aa">_top</a>))</div>
<div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;            <span class="keywordflow">if</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af58429399152c275ceb33ed4e99ffe3d">_width</a> <span class="keywordflow">and</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af58429399152c275ceb33ed4e99ffe3d">_width</a>[-1] == <span class="stringliteral">&quot;%&quot;</span> <span class="keywordflow">or</span> \</div>
<div class="line"><a name="l00857"></a><span class="lineno">  857</span>&#160;               self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aee407093fea1b51db38cf665dfd18003">_height</a> <span class="keywordflow">and</span> self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aee407093fea1b51db38cf665dfd18003">_height</a>[-1] == <span class="stringliteral">&quot;%&quot;</span>:</div>
<div class="line"><a name="l00858"></a><span class="lineno">  858</span>&#160;                <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;RESIZING&quot;</span>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a814a311328f2d8bb6fa6c9db969725ef">name</a>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af58429399152c275ceb33ed4e99ffe3d">_width</a>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aee407093fea1b51db38cf665dfd18003">_height</a></div>
<div class="line"><a name="l00859"></a><span class="lineno">  859</span>&#160;                self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a79f0952c8c1e9e639e219c97944a1147">_set_size</a>((self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af58429399152c275ceb33ed4e99ffe3d">_width</a>, self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aee407093fea1b51db38cf665dfd18003">_height</a>))</div>
<div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;        <span class="keywordflow">for</span> child <span class="keywordflow">in</span> self:</div>
<div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;            <span class="keywordflow">if</span> isinstance(child, Control):</div>
<div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;                child.resize(evt)</div>
<div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;        <span class="comment"># call original handler (wx.HtmlWindow)</span></div>
<div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;        <span class="keywordflow">if</span> evt:</div>
<div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160;            evt.Skip()</div>
<div class="line"><a name="l00866"></a><span class="lineno">  866</span>&#160;    </div>
<div class="line"><a name="l00867"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a485519b5a8d351bbb3d79b893968cc11">  867</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a485519b5a8d351bbb3d79b893968cc11">get_char_width</a>(self):</div>
<div class="line"><a name="l00868"></a><span class="lineno">  868</span>&#160;        <span class="stringliteral">&quot;Returns the average character width for this window.&quot;</span></div>
<div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;        <span class="keywordflow">return</span> self.wx_obj.GetCharWidth()</div>
<div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160;    </div>
<div class="line"><a name="l00871"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a81c05bce87b2980cd7ab5ab22fd5189b">  871</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a81c05bce87b2980cd7ab5ab22fd5189b">get_char_height</a>(self):</div>
<div class="line"><a name="l00872"></a><span class="lineno">  872</span>&#160;        <span class="stringliteral">&quot;Returns the character height for this window.&quot;</span></div>
<div class="line"><a name="l00873"></a><span class="lineno">  873</span>&#160;        <span class="keywordflow">return</span> self.wx_obj.GetCharHeight()</div>
<div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;</div>
<div class="line"><a name="l00875"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a1bdc2d053468f6cce103f23e9ed0471e">  875</a></span>&#160;    pos = InitSpec(_get_pos, _set_pos, default=[ -1, -1])</div>
<div class="line"><a name="l00876"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a6bdc3fc13102dcfe16fb0d39264c6ab3">  876</a></span>&#160;    size = InitSpec(_get_size, _set_size, default=[ -1, -1])</div>
<div class="line"><a name="l00877"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a0c4900aa1b5d4d65b1ad2b2592bfa40b">  877</a></span>&#160;    client_size = Spec(<span class="keyword">lambda</span> self: self.wx_obj.GetClientSize(),</div>
<div class="line"><a name="l00878"></a><span class="lineno">  878</span>&#160;                       <span class="keyword">lambda</span> self, value: self.wx_obj.SetClientSize(value),</div>
<div class="line"><a name="l00879"></a><span class="lineno">  879</span>&#160;                       default=[ -1, -1])</div>
<div class="line"><a name="l00880"></a><span class="lineno">  880</span>&#160;</div>
<div class="line"><a name="l00881"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a8770ad042011a483d2dc29da4c5fd48c">  881</a></span>&#160;    width = DimensionSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#af58429399152c275ceb33ed4e99ffe3d">_width</a>, </div>
<div class="line"><a name="l00882"></a><span class="lineno">  882</span>&#160;                          <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a2e83ac3b6fe325c0ec3dc76b9b6cbc73">_set_width</a>(value),</div>
<div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;                          default=<span class="stringliteral">&quot;&quot;</span>, type=<span class="stringliteral">&quot;string&quot;</span>, group=<span class="stringliteral">&quot;size&quot;</span>)</div>
<div class="line"><a name="l00884"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a06e3511fc8b0141f2b6323e2037578b4">  884</a></span>&#160;    height = DimensionSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#aee407093fea1b51db38cf665dfd18003">_height</a>, </div>
<div class="line"><a name="l00885"></a><span class="lineno">  885</span>&#160;                           <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a5d8a866e98fee78e792a4a821ad2ba8c">_set_height</a>(value),</div>
<div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;                           default=<span class="stringliteral">&quot;&quot;</span>, type=<span class="stringliteral">&quot;string&quot;</span>, group=<span class="stringliteral">&quot;size&quot;</span>)</div>
<div class="line"><a name="l00887"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#add484617930345c064355aeeb021b1a3">  887</a></span>&#160;    left = DimensionSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#a83bf6108298ad8d8e8febed78237261a">_left</a>, </div>
<div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;                           <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#affbafdf05c45ddd850c9ee6f6ac067e6">_set_left</a>(value),</div>
<div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;                           default=<span class="stringliteral">&quot;&quot;</span>, type=<span class="stringliteral">&quot;string&quot;</span>, group=<span class="stringliteral">&quot;position&quot;</span>)</div>
<div class="line"><a name="l00890"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aae2936020385d21e5ea27b086869ac2a">  890</a></span>&#160;    top = DimensionSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html#ab1d4f5cb9769d145ebf1f1db21f5b9aa">_top</a>, </div>
<div class="line"><a name="l00891"></a><span class="lineno">  891</span>&#160;                           <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#abaa2cd80a892a4933aea479a7a97c093">_set_top</a>(value),</div>
<div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160;                           default=<span class="stringliteral">&quot;&quot;</span>, type=<span class="stringliteral">&quot;string&quot;</span>, group=<span class="stringliteral">&quot;position&quot;</span>)</div>
<div class="line"><a name="l00893"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a067b3e4f00ead528f81de3fa26091674">  893</a></span>&#160;    margin_left = DimensionSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7d5ce0fc0165e6c410ce84e1cfad021e">_get_margin</a>(0), </div>
<div class="line"><a name="l00894"></a><span class="lineno">  894</span>&#160;                           <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a17fb25dd4c1b68f28fc239d2ab5d3e0c">_set_margin</a>(value, 0),</div>
<div class="line"><a name="l00895"></a><span class="lineno">  895</span>&#160;                           default=0, type=<span class="stringliteral">&quot;integer&quot;</span>, group=<span class="stringliteral">&quot;margin&quot;</span>)</div>
<div class="line"><a name="l00896"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a8ad2d0f13c5877defe52377e9f32a187">  896</a></span>&#160;    margin_top = DimensionSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7d5ce0fc0165e6c410ce84e1cfad021e">_get_margin</a>(1), </div>
<div class="line"><a name="l00897"></a><span class="lineno">  897</span>&#160;                           <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a17fb25dd4c1b68f28fc239d2ab5d3e0c">_set_margin</a>(value, 1),</div>
<div class="line"><a name="l00898"></a><span class="lineno">  898</span>&#160;                           default=0, type=<span class="stringliteral">&quot;integer&quot;</span>, group=<span class="stringliteral">&quot;margin&quot;</span>)</div>
<div class="line"><a name="l00899"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a51646b033b8051928dc38991c3df1593">  899</a></span>&#160;    margin_right = DimensionSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7d5ce0fc0165e6c410ce84e1cfad021e">_get_margin</a>(2), </div>
<div class="line"><a name="l00900"></a><span class="lineno">  900</span>&#160;                           <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a17fb25dd4c1b68f28fc239d2ab5d3e0c">_set_margin</a>(value, 2),</div>
<div class="line"><a name="l00901"></a><span class="lineno">  901</span>&#160;                           default=0, type=<span class="stringliteral">&quot;integer&quot;</span>, group=<span class="stringliteral">&quot;margin&quot;</span>)</div>
<div class="line"><a name="l00902"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a99163a2fe83972b5e624f751c14c8edc">  902</a></span>&#160;    margin_bottom = DimensionSpec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7d5ce0fc0165e6c410ce84e1cfad021e">_get_margin</a>(3),</div>
<div class="line"><a name="l00903"></a><span class="lineno">  903</span>&#160;                           <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a17fb25dd4c1b68f28fc239d2ab5d3e0c">_set_margin</a>(value, 3),</div>
<div class="line"><a name="l00904"></a><span class="lineno">  904</span>&#160;                           default=0, type=<span class="stringliteral">&quot;integer&quot;</span>, group=<span class="stringliteral">&quot;margin&quot;</span>)</div>
<div class="line"><a name="l00905"></a><span class="lineno">  905</span>&#160;</div>
<div class="line"><a name="l00906"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a997a754cce31f9724db1830332eccba4">  906</a></span>&#160;    border = StyleSpec({<span class="stringliteral">&#39;default&#39;</span>: wx.BORDER_DEFAULT,</div>
<div class="line"><a name="l00907"></a><span class="lineno">  907</span>&#160;                        <span class="stringliteral">&#39;simple&#39;</span>: wx.BORDER_SIMPLE,</div>
<div class="line"><a name="l00908"></a><span class="lineno">  908</span>&#160;                        <span class="stringliteral">&#39;sunken&#39;</span>: wx.BORDER_SUNKEN,</div>
<div class="line"><a name="l00909"></a><span class="lineno">  909</span>&#160;                        <span class="stringliteral">&#39;raised&#39;</span>: wx.BORDER_RAISED,</div>
<div class="line"><a name="l00910"></a><span class="lineno">  910</span>&#160;                        <span class="stringliteral">&#39;static&#39;</span>: wx.BORDER_STATIC,</div>
<div class="line"><a name="l00911"></a><span class="lineno">  911</span>&#160;                        <span class="stringliteral">&#39;theme&#39;</span>: wx.BORDER_THEME, <span class="comment"># native</span></div>
<div class="line"><a name="l00912"></a><span class="lineno">  912</span>&#160;                        <span class="stringliteral">&#39;none&#39;</span>: wx.BORDER_NONE, },</div>
<div class="line"><a name="l00913"></a><span class="lineno">  913</span>&#160;                       doc=<span class="stringliteral">&quot;Kind of border to show (some will have no effect&quot;</span></div>
<div class="line"><a name="l00914"></a><span class="lineno">  914</span>&#160;                           <span class="stringliteral">&quot; depending on control and platform)&quot;</span>,</div>
<div class="line"><a name="l00915"></a><span class="lineno">  915</span>&#160;                       default=<span class="stringliteral">&#39;default&#39;</span>)</div>
<div class="line"><a name="l00916"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#af096f5bb9d23ec523bbc28cb42f41534">  916</a></span>&#160;    transparent = StyleSpec(wx.TRANSPARENT_WINDOW, default=<span class="keyword">False</span>,</div>
<div class="line"><a name="l00917"></a><span class="lineno">  917</span>&#160;                            doc=<span class="stringliteral">&quot;will not receive paint events. Windows only&quot;</span>)</div>
<div class="line"><a name="l00918"></a><span class="lineno">  918</span>&#160;</div>
<div class="line"><a name="l00919"></a><span class="lineno">  919</span>&#160;    <span class="comment"># Events:</span></div>
<div class="line"><a name="l00920"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7363f0e0e3689d62fbac1d02feb1e8f2">  920</a></span>&#160;    onfocus = EventSpec(<span class="stringliteral">&#39;focus&#39;</span>, binding=wx.EVT_SET_FOCUS, kind=FocusEvent)</div>
<div class="line"><a name="l00921"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ab86ecfb155da07a3a743a5af2d2682c5">  921</a></span>&#160;    onblur = EventSpec(<span class="stringliteral">&#39;blur&#39;</span>, binding=wx.EVT_KILL_FOCUS, kind=FocusEvent)</div>
<div class="line"><a name="l00922"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#af75caef7d5ad02737f0e8ddd8db284e6">  922</a></span>&#160;    onmousemove = EventSpec(<span class="stringliteral">&#39;mousemove&#39;</span>, binding=wx.EVT_MOTION, kind=MouseEvent) </div>
<div class="line"><a name="l00923"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a54993d76ef7245dc4e4ca06a0ff56a6b">  923</a></span>&#160;    onmouseover = EventSpec(<span class="stringliteral">&#39;mouseover&#39;</span>, binding=wx.EVT_ENTER_WINDOW, kind=MouseEvent) </div>
<div class="line"><a name="l00924"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aa8fccb366220a6f1e9150117acf79fb4">  924</a></span>&#160;    onmouseout = EventSpec(<span class="stringliteral">&#39;mouseout&#39;</span>, binding=wx.EVT_LEAVE_WINDOW, kind=MouseEvent) </div>
<div class="line"><a name="l00925"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#af88defe5224379da1c48ecb08bdc0ff5">  925</a></span>&#160;    onmousewheel = EventSpec(<span class="stringliteral">&#39;mousewheel&#39;</span>, binding=wx.EVT_MOUSEWHEEL, kind=MouseEvent) </div>
<div class="line"><a name="l00926"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ae8e27061b243a9fd453d32412a47ad0c">  926</a></span>&#160;    onmousedown = EventSpec(<span class="stringliteral">&#39;mousedown&#39;</span>, binding=(wx.EVT_LEFT_DOWN, </div>
<div class="line"><a name="l00927"></a><span class="lineno">  927</span>&#160;                                                  wx.EVT_MIDDLE_DOWN, </div>
<div class="line"><a name="l00928"></a><span class="lineno">  928</span>&#160;                                                  wx.EVT_RIGHT_DOWN), </div>
<div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160;                                        kind=MouseEvent)</div>
<div class="line"><a name="l00930"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aa32c1d4ab4316af740b54df4c539f9e2">  930</a></span>&#160;    onmousedclick = EventSpec(<span class="stringliteral">&#39;mousedclick&#39;</span>, binding=(wx.EVT_LEFT_DCLICK, </div>
<div class="line"><a name="l00931"></a><span class="lineno">  931</span>&#160;                                                  wx.EVT_MIDDLE_DCLICK,</div>
<div class="line"><a name="l00932"></a><span class="lineno">  932</span>&#160;                                                  wx.EVT_RIGHT_DCLICK),</div>
<div class="line"><a name="l00933"></a><span class="lineno">  933</span>&#160;                                         kind=MouseEvent)</div>
<div class="line"><a name="l00934"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a8506ff14a30c0a5babdf906592f87163">  934</a></span>&#160;    onmouseup = EventSpec(<span class="stringliteral">&#39;mouseup&#39;</span>, binding=(wx.EVT_LEFT_UP,</div>
<div class="line"><a name="l00935"></a><span class="lineno">  935</span>&#160;                                              wx.EVT_MIDDLE_UP,</div>
<div class="line"><a name="l00936"></a><span class="lineno">  936</span>&#160;                                              wx.EVT_RIGHT_UP), </div>
<div class="line"><a name="l00937"></a><span class="lineno">  937</span>&#160;                                     kind=MouseEvent)</div>
<div class="line"><a name="l00938"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#abff58c436c69dab6a97e4aa19b8b140c">  938</a></span>&#160;    onkeypress = EventSpec(<span class="stringliteral">&#39;keypress&#39;</span>, binding=wx.EVT_CHAR, kind=KeyEvent)</div>
<div class="line"><a name="l00939"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#abf87ebb36ce68a87986fd87edc69aa88">  939</a></span>&#160;    onkeydown = EventSpec(<span class="stringliteral">&#39;keydown&#39;</span>, binding=wx.EVT_KEY_DOWN, kind=KeyEvent)</div>
<div class="line"><a name="l00940"></a><span class="lineno"><a class="line" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a01d7df762cde9c20b2a1d279735e1f1f">  940</a></span>&#160;    onkeyup = EventSpec(<span class="stringliteral">&#39;keyup&#39;</span>, binding=wx.EVT_KEY_UP, kind=KeyEvent)</div>
<div class="line"><a name="l00941"></a><span class="lineno">  941</span>&#160;</div>
<div class="line"><a name="l00942"></a><span class="lineno">  942</span>&#160;</div>
<div class="line"><a name="l00943"></a><span class="lineno"><a class="line" href="../../d3/dd2/classgui_1_1component_1_1Control.html">  943</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d3/dd2/classgui_1_1component_1_1Control.html">Control</a>(<a class="code" href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html">ControlSuper</a>):</div>
<div class="line"><a name="l00944"></a><span class="lineno">  944</span>&#160;    <span class="stringliteral">&quot;This is the base class for a control&quot;</span></div>
<div class="line"><a name="l00945"></a><span class="lineno">  945</span>&#160;</div>
<div class="line"><a name="l00946"></a><span class="lineno"><a class="line" href="../../d3/dd2/classgui_1_1component_1_1Control.html#acaf0b0345825d97e11a3593c54ebae02">  946</a></span>&#160;    sizer_border = DimensionSpec(_name=<span class="stringliteral">&quot;_sizer_border&quot;</span>, default=0, </div>
<div class="line"><a name="l00947"></a><span class="lineno">  947</span>&#160;            type=<span class="stringliteral">&quot;integer&quot;</span>, group=<span class="stringliteral">&quot;sizer&quot;</span>,</div>
<div class="line"><a name="l00948"></a><span class="lineno">  948</span>&#160;            doc=<span class="stringliteral">&quot;empty space arround a item, used by the sizer&quot;</span>)</div>
<div class="line"><a name="l00949"></a><span class="lineno"><a class="line" href="../../d3/dd2/classgui_1_1component_1_1Control.html#a83a49ce98bea505b8f767d1909e5b80d">  949</a></span>&#160;    sizer_align = DimensionSpec(mapping={<span class="stringliteral">&#39;left&#39;</span>: wx.ALIGN_LEFT, </div>
<div class="line"><a name="l00950"></a><span class="lineno">  950</span>&#160;                                    <span class="stringliteral">&#39;top&#39;</span>: wx.ALIGN_TOP,</div>
<div class="line"><a name="l00951"></a><span class="lineno">  951</span>&#160;                                    <span class="stringliteral">&#39;center&#39;</span>: wx.ALIGN_CENTER, </div>
<div class="line"><a name="l00952"></a><span class="lineno">  952</span>&#160;                                    <span class="stringliteral">&#39;right&#39;</span>: wx.ALIGN_RIGHT,</div>
<div class="line"><a name="l00953"></a><span class="lineno">  953</span>&#160;                                    <span class="stringliteral">&#39;bottom&#39;</span>: wx.ALIGN_BOTTOM, }, </div>
<div class="line"><a name="l00954"></a><span class="lineno">  954</span>&#160;            default=<span class="stringliteral">&#39;left&#39;</span>, _name=<span class="stringliteral">&quot;_sizer_align&quot;</span>, type=<span class="stringliteral">&quot;enum&quot;</span>, group=<span class="stringliteral">&quot;sizer&quot;</span>,</div>
<div class="line"><a name="l00955"></a><span class="lineno">  955</span>&#160;            doc=<span class="stringliteral">&quot;alignment within the space allotted to it by the sizer&quot;</span>)</div>
<div class="line"><a name="l00956"></a><span class="lineno">  956</span>&#160;</div>
<div class="line"><a name="l00957"></a><span class="lineno">  957</span>&#160;</div>
<div class="line"><a name="l00958"></a><span class="lineno">  958</span>&#160;</div>
<div class="line"><a name="l00959"></a><span class="lineno"><a class="line" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html">  959</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html">ImageBackgroundMixin</a>(object):</div>
<div class="line"><a name="l00960"></a><span class="lineno">  960</span>&#160;    <span class="stringliteral">&quot;Tiled background image support&quot;</span></div>
<div class="line"><a name="l00961"></a><span class="lineno">  961</span>&#160;</div>
<div class="line"><a name="l00962"></a><span class="lineno"><a class="line" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a8727245648105c2e457b590e27b8b183">  962</a></span>&#160;    __metaclass__ = ComponentBase</div>
<div class="line"><a name="l00963"></a><span class="lineno">  963</span>&#160;</div>
<div class="line"><a name="l00964"></a><span class="lineno"><a class="line" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#acb097445bcb15fda50c8ef0a2f3577f9">  964</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#acb097445bcb15fda50c8ef0a2f3577f9">_set_image</a>(self, image):</div>
<div class="line"><a name="l00965"></a><span class="lineno">  965</span>&#160;        <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;using image...&quot;</span>, image, self._meta.name</div>
<div class="line"><a name="l00966"></a><span class="lineno"><a class="line" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#af2c25edd54f842dcdb1a5f27b9289300">  966</a></span>&#160;        self.<a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#af2c25edd54f842dcdb1a5f27b9289300">_image_filename</a> = image</div>
<div class="line"><a name="l00967"></a><span class="lineno">  967</span>&#160;        <span class="comment"># KEA 2001-07-27</span></div>
<div class="line"><a name="l00968"></a><span class="lineno">  968</span>&#160;        <span class="comment"># Load the bitmap once and keep it around</span></div>
<div class="line"><a name="l00969"></a><span class="lineno">  969</span>&#160;        <span class="comment"># this could fail, so should be a try/except.</span></div>
<div class="line"><a name="l00970"></a><span class="lineno">  970</span>&#160;        <span class="keywordflow">if</span> image:</div>
<div class="line"><a name="l00971"></a><span class="lineno"><a class="line" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a6d37025265baa61c86ed43eda9c41f5a">  971</a></span>&#160;            self.<a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a6d37025265baa61c86ed43eda9c41f5a">_bitmap</a> = Bitmap(image)</div>
<div class="line"><a name="l00972"></a><span class="lineno">  972</span>&#160;            <span class="comment"># bind only one time (but designer could had destroyed the wx_obj!)</span></div>
<div class="line"><a name="l00973"></a><span class="lineno">  973</span>&#160;            <span class="keywordflow">if</span> <span class="keywordflow">not</span> hasattr(self.wx_obj, <span class="stringliteral">&quot;image_bg_mixin_bound&quot;</span>):</div>
<div class="line"><a name="l00974"></a><span class="lineno">  974</span>&#160;                <span class="comment"># only bound ourselves, don&#39;t catch childrens&#39; erase/destroy</span></div>
<div class="line"><a name="l00975"></a><span class="lineno">  975</span>&#160;                self.wx_obj.Bind(wx.EVT_ERASE_BACKGROUND, </div>
<div class="line"><a name="l00976"></a><span class="lineno">  976</span>&#160;                                 self.<a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a2b71254b22fcd5f9583415b0dd497db8">__on_erase_background</a>, self.wx_obj)</div>
<div class="line"><a name="l00977"></a><span class="lineno">  977</span>&#160;                self.wx_obj.Bind(wx.EVT_WINDOW_DESTROY, </div>
<div class="line"><a name="l00978"></a><span class="lineno">  978</span>&#160;                                 self.<a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a8d80cee10635db3cce6c6d93cfdd6dca">__on_destroy</a>, self.wx_obj)</div>
<div class="line"><a name="l00979"></a><span class="lineno">  979</span>&#160;                self.wx_obj.image_bg_mixin_bound = <span class="keyword">True</span></div>
<div class="line"><a name="l00980"></a><span class="lineno">  980</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00981"></a><span class="lineno">  981</span>&#160;            <span class="comment"># clean up the image</span></div>
<div class="line"><a name="l00982"></a><span class="lineno">  982</span>&#160;            self.<a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a6d37025265baa61c86ed43eda9c41f5a">_bitmap</a> = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00983"></a><span class="lineno">  983</span>&#160;</div>
<div class="line"><a name="l00984"></a><span class="lineno"><a class="line" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#adb0a9358c4fc0d64a40af727a40eb38c">  984</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#adb0a9358c4fc0d64a40af727a40eb38c">_get_image</a>(self):</div>
<div class="line"><a name="l00985"></a><span class="lineno">  985</span>&#160;        <span class="keywordflow">return</span> getattr(self, <span class="stringliteral">&quot;_image_filename&quot;</span>, <span class="keywordtype">None</span>) <span class="keywordflow">or</span> <span class="stringliteral">&quot;&quot;</span></div>
<div class="line"><a name="l00986"></a><span class="lineno">  986</span>&#160;</div>
<div class="line"><a name="l00987"></a><span class="lineno"><a class="line" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#ada7ece201bb2583a5f02f579271b51ca">  987</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#ada7ece201bb2583a5f02f579271b51ca">__tile_background</a>(self, dc):</div>
<div class="line"><a name="l00988"></a><span class="lineno">  988</span>&#160;        <span class="stringliteral">&quot;make several copies of the background bitmap&quot;</span></div>
<div class="line"><a name="l00989"></a><span class="lineno">  989</span>&#160;        sz = self.wx_obj.GetClientSize()</div>
<div class="line"><a name="l00990"></a><span class="lineno">  990</span>&#160;        bmp = self._bitmap.get_bits()</div>
<div class="line"><a name="l00991"></a><span class="lineno">  991</span>&#160;        w = bmp.GetWidth()</div>
<div class="line"><a name="l00992"></a><span class="lineno">  992</span>&#160;        h = bmp.GetHeight()</div>
<div class="line"><a name="l00993"></a><span class="lineno">  993</span>&#160;</div>
<div class="line"><a name="l00994"></a><span class="lineno">  994</span>&#160;        <span class="keywordflow">if</span> isinstance(self, wx.ScrolledWindow):</div>
<div class="line"><a name="l00995"></a><span class="lineno">  995</span>&#160;            <span class="comment"># adjust for scrolled position</span></div>
<div class="line"><a name="l00996"></a><span class="lineno">  996</span>&#160;            spx, spy = self.wx_obj.GetScrollPixelsPerUnit()</div>
<div class="line"><a name="l00997"></a><span class="lineno">  997</span>&#160;            vsx, vsy = self.wx_obj.GetViewStart()</div>
<div class="line"><a name="l00998"></a><span class="lineno">  998</span>&#160;            dx,  dy  = (spx * vsx) % w, (spy * vsy) % h</div>
<div class="line"><a name="l00999"></a><span class="lineno">  999</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;            dx, dy = (w, h)</div>
<div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;</div>
<div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160;        x = -dx</div>
<div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160;        <span class="keywordflow">while</span> x &lt; sz.width:</div>
<div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160;            y = -dy</div>
<div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160;            <span class="keywordflow">while</span> y &lt; sz.height:</div>
<div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160;                dc.DrawBitmap(bmp, x, y)</div>
<div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;                y = y + h</div>
<div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;            x = x + w</div>
<div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;</div>
<div class="line"><a name="l01010"></a><span class="lineno"><a class="line" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a8d80cee10635db3cce6c6d93cfdd6dca"> 1010</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a8d80cee10635db3cce6c6d93cfdd6dca">__on_destroy</a>(self, event):</div>
<div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;        <span class="keywordflow">if</span> event.EventObject == self.wx_obj:</div>
<div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;            <span class="comment"># memory leak cleanup</span></div>
<div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;            self.<a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a6d37025265baa61c86ed43eda9c41f5a">_bitmap</a> = <span class="keywordtype">None</span></div>
<div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160;        </div>
<div class="line"><a name="l01015"></a><span class="lineno"><a class="line" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a2b71254b22fcd5f9583415b0dd497db8"> 1015</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a2b71254b22fcd5f9583415b0dd497db8">__on_erase_background</a>(self, evt):</div>
<div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;        <span class="stringliteral">&quot;Draw the image as background&quot;</span></div>
<div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a6d37025265baa61c86ed43eda9c41f5a">_bitmap</a>:</div>
<div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;            dc = evt.GetDC()</div>
<div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160;            </div>
<div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;            <span class="keywordflow">if</span> <span class="keywordflow">not</span> dc:</div>
<div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160;                dc = wx.ClientDC(self)</div>
<div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160;                r = self.wx_obj.GetUpdateRegion().GetBox()</div>
<div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160;                dc.SetClippingRegion(r.x, r.y, r.width, r.height)</div>
<div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160;                                                           </div>
<div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>&#160;            <span class="keywordflow">if</span> self._background_tiling:</div>
<div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160;                self.<a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#ada7ece201bb2583a5f02f579271b51ca">__tile_background</a>(dc)</div>
<div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160;            <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>&#160;                dc.DrawBitmapPoint(self._bitmap.get_bits(), (0, 0))</div>
<div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160;</div>
<div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;</div>
<div class="line"><a name="l01031"></a><span class="lineno"><a class="line" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#aa1ed59e583819e22aa12d967e7935862"> 1031</a></span>&#160;    image = Spec(<span class="keyword">lambda</span> self: self.<a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#adb0a9358c4fc0d64a40af727a40eb38c">_get_image</a>(), </div>
<div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;                 <span class="keyword">lambda</span> self, value: self.<a class="code" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#acb097445bcb15fda50c8ef0a2f3577f9">_set_image</a>(value), </div>
<div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;                 doc=<span class="stringliteral">&quot;image (filename) used as background&quot;</span>, </div>
<div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160;                 type=<span class="stringliteral">&quot;image_file&quot;</span>)</div>
<div class="line"><a name="l01035"></a><span class="lineno"><a class="line" href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a7f7976965a833798fdf2a31248b0a8a8"> 1035</a></span>&#160;    tiled = Spec(_name=<span class="stringliteral">&quot;_background_tiling&quot;</span>, default=<span class="keyword">False</span>, </div>
<div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160;                 doc=<span class="stringliteral">&quot;image background tiling&quot;</span>, type=<span class="stringliteral">&#39;boolean&#39;</span>)</div>
<div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;</div>
<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;</div>
<div class="line"><a name="l01039"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html"> 1039</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html">SubComponent</a>(object):</div>
<div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160;    <span class="stringliteral">&quot;Base class to use in complex controls (like ListView)&quot;</span></div>
<div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160;    </div>
<div class="line"><a name="l01042"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a1788eb9b6b435e60bb7ff73fd5f75dc8"> 1042</a></span>&#160;    __metaclass__ = ComponentBase</div>
<div class="line"><a name="l01043"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a431e7b7324ea2952c3927ad76f5c911c"> 1043</a></span>&#160;    wx_obj = <span class="keywordtype">None</span>               <span class="comment"># no wx object is related</span></div>
<div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160;    </div>
<div class="line"><a name="l01045"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a1b01b92db47fd5bcb52cb797c6737056"> 1045</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a1b01b92db47fd5bcb52cb797c6737056">__iter__</a>(self):</div>
<div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>&#160;        <span class="keywordflow">return</span> [].<a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a1b01b92db47fd5bcb52cb797c6737056">__iter__</a>()    <span class="comment"># we have no children (designer!)</span></div>
<div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>&#160;    </div>
<div class="line"><a name="l01048"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a8332046f36f996801873dd4610cfafd5"> 1048</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a8332046f36f996801873dd4610cfafd5">__getitem__</a>(self, key):</div>
<div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160;        <span class="keywordflow">return</span> <span class="keywordtype">None</span></div>
<div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;        </div>
<div class="line"><a name="l01051"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a9e9780792226a60af754524c7bbd77d8"> 1051</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a9e9780792226a60af754524c7bbd77d8">__init__</a>(self, parent=None, **kwargs):</div>
<div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160;        <span class="comment"># if using context manager, use the parent reference from the creation stack:</span></div>
<div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> parent <span class="keywordflow">and</span> STACK:</div>
<div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160;            parent = STACK[-1]</div>
<div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>&#160;            <span class="keywordflow">if</span> DEBUG: <span class="keywordflow">print</span> <span class="stringliteral">&quot;using parent stack &quot;</span>, parent</div>
<div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>&#160;        <span class="comment"># set up the properties:</span></div>
<div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>&#160;        <span class="keywordflow">for</span> spec_name, spec <span class="keywordflow">in</span> self._meta.specs.items():</div>
<div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>&#160;            <span class="keywordflow">if</span> <span class="keywordflow">not</span> spec.read_only:</div>
<div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;                value = kwargs.get(spec_name, spec.default)</div>
<div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>&#160;                setattr(self, spec_name, value)</div>
<div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160;        self.<a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#abbd0beed5e2f9ca4c85c159aa2336fd2">set_parent</a>(parent, init=<span class="keyword">True</span>)</div>
<div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160;</div>
<div class="line"><a name="l01063"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#abbd0beed5e2f9ca4c85c159aa2336fd2"> 1063</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#abbd0beed5e2f9ca4c85c159aa2336fd2">set_parent</a>(self, new_parent, init=False):</div>
<div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>&#160;        <span class="stringliteral">&quot;Associate the component to the control (it could be recreated)&quot;</span></div>
<div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>&#160;        <span class="comment"># store gui reference inside of wx object (this will enable rebuild...)</span></div>
<div class="line"><a name="l01066"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a87a3382b8aaffab709351a9550cf06ca"> 1066</a></span>&#160;        self.<a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a87a3382b8aaffab709351a9550cf06ca">_parent</a> = <a class="code" href="../../d9/d90/namespacegui_1_1component.html#a937836205f3a4daa11179df3fc58e3c9">get</a>(new_parent, init=<span class="keyword">False</span>)    <span class="comment"># store new parent</span></div>
<div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>&#160;        <span class="keywordflow">if</span> init:</div>
<div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160;            self.<a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a87a3382b8aaffab709351a9550cf06ca">_parent</a>[self._name] = self     <span class="comment"># add child reference</span></div>
<div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>&#160;</div>
<div class="line"><a name="l01070"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#afed385eb1b473379461eef54d7e1e5a6"> 1070</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#afed385eb1b473379461eef54d7e1e5a6">rebuild</a>(self, **kwargs):</div>
<div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>&#160;        <span class="stringliteral">&quot;Update a property value with (used by the designer)&quot;</span></div>
<div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>&#160;        <span class="keywordflow">for</span> name, value <span class="keywordflow">in</span> kwargs.items():</div>
<div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>&#160;            setattr(self, name, value)</div>
<div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160;</div>
<div class="line"><a name="l01075"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a796d83089d10ae7d8cc4677b532a517f"> 1075</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a796d83089d10ae7d8cc4677b532a517f">destroy</a>(self, **kwargs):</div>
<div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>&#160;        <span class="keywordflow">pass</span></div>
<div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>&#160;</div>
<div class="line"><a name="l01078"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a4e59e87efe87739885396f52af179c86"> 1078</a></span>&#160;    <span class="keyword">def </span><a class="code" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a4e59e87efe87739885396f52af179c86">__repr__</a>(self, prefix=&quot;gui&quot;, parent=&quot;&quot;, indent=0):</div>
<div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d9/d90/namespacegui_1_1component.html#ad5c2b0e24b70b06644b3de48659e4231">represent</a>(self, prefix, parent, indent)</div>
<div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160;</div>
<div class="line"><a name="l01081"></a><span class="lineno"><a class="line" href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#abb4719a77e4737fdbf367873ac976c27"> 1081</a></span>&#160;    parent = Spec(<span class="keyword">lambda</span> self: self._parent.name, </div>
<div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160;                      optional=<span class="keyword">False</span>, default=<span class="stringliteral">&quot;&quot;</span>,</div>
<div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;                      doc=<span class="stringliteral">&quot;parent window (used internally)&quot;</span>)</div>
<div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160;</div>
<div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>&#160;</div>
<div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>&#160;<span class="comment"># Auxiliary functions &amp; classes:</span></div>
<div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>&#160;</div>
<div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>&#160;            </div>
<div class="line"><a name="l01089"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a5334beaff782e6f4b7f39e4d000539cb"> 1089</a></span>&#160;<span class="keyword">def </span><a class="code" href="../../d9/d90/namespacegui_1_1component.html#a5334beaff782e6f4b7f39e4d000539cb">new_id</a>(id=None):</div>
<div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>&#160;    <span class="keywordflow">if</span> id <span class="keywordflow">is</span> <span class="keywordtype">None</span> <span class="keywordflow">or</span> id == -1:</div>
<div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>&#160;        <span class="keywordflow">return</span> wx.NewId()</div>
<div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>&#160;    <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160;        <span class="keywordflow">return</span> id</div>
<div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160;</div>
<div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160;</div>
<div class="line"><a name="l01096"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a08e7da0d8a206791ef62efe87d4d1ac1"> 1096</a></span>&#160;sort_order_map = {InitSpec: 1, DimensionSpec: 3, StyleSpec: 2, EventSpec: 5, Spec: 4}</div>
<div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>&#160;</div>
<div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>&#160;</div>
<div class="line"><a name="l01099"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#aea9af37046faf801b2ee9af862045b26"> 1099</a></span>&#160;<span class="keyword">def </span><a class="code" href="../../d9/d90/namespacegui_1_1component.html#aea9af37046faf801b2ee9af862045b26">get_sort_key</a>((name, spec)):</div>
<div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>&#160;    <span class="keywordflow">return</span> sort_order_map.get(spec.__class__, 6), name</div>
<div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>&#160;</div>
<div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>&#160;</div>
<div class="line"><a name="l01103"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#ad5c2b0e24b70b06644b3de48659e4231"> 1103</a></span>&#160;<span class="keyword">def </span><a class="code" href="../../d9/d90/namespacegui_1_1component.html#ad5c2b0e24b70b06644b3de48659e4231">represent</a>(obj, prefix, parent=&quot;&quot;, indent=0, context=False, max_cols=80):</div>
<div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;    <span class="stringliteral">&quot;Construct a string representing the object&quot;</span></div>
<div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>&#160;    <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;        name = getattr(obj, <span class="stringliteral">&quot;name&quot;</span>, <span class="stringliteral">&quot;&quot;</span>)</div>
<div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;        class_name = <span class="stringliteral">&quot;%s.%s&quot;</span> % (prefix, obj.__class__.__name__)</div>
<div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>&#160;        padding = len(class_name) + 1 + indent * 4 + (5 <span class="keywordflow">if</span> context <span class="keywordflow">else</span> 0)</div>
<div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160;        params = []</div>
<div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160;        <span class="keywordflow">for</span> (k, spec) <span class="keywordflow">in</span> sorted(obj._meta.specs.items(), key=get_sort_key):</div>
<div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160;            <span class="keywordflow">if</span> k == <span class="stringliteral">&quot;index&quot;</span>:        <span class="comment"># index is really defined by creation order</span></div>
<div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160;                <span class="keywordflow">continue</span>            <span class="comment"># also, avoid infinite recursion</span></div>
<div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>&#160;            <span class="keywordflow">if</span> k == <span class="stringliteral">&quot;parent&quot;</span> <span class="keywordflow">and</span> parent != <span class="stringliteral">&quot;&quot;</span>:</div>
<div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>&#160;                v = parent</div>
<div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>&#160;            <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>&#160;                v = getattr(obj, k, <span class="stringliteral">&quot;&quot;</span>)</div>
<div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>&#160;                <span class="keywordflow">if</span> (<span class="keywordflow">not</span> isinstance(spec, InternalSpec) </div>
<div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>&#160;                    <span class="keywordflow">and</span> v != spec.default</div>
<div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>&#160;                    <span class="keywordflow">and</span> (k != <span class="stringliteral">&#39;id&#39;</span> <span class="keywordflow">or</span> v &gt; 0) </div>
<div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>&#160;                    <span class="keywordflow">and</span> isinstance(v, </div>
<div class="line"><a name="l01121"></a><span class="lineno"> 1121</span>&#160;                         (basestring, int, long, float, bool, dict, list, </div>
<div class="line"><a name="l01122"></a><span class="lineno"> 1122</span>&#160;                          decimal.Decimal, </div>
<div class="line"><a name="l01123"></a><span class="lineno"> 1123</span>&#160;                          datetime.datetime, datetime.date, datetime.time,</div>
<div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>&#160;                          Font, Color))                </div>
<div class="line"><a name="l01125"></a><span class="lineno"> 1125</span>&#160;                    <span class="keywordflow">and</span> repr(v) != <span class="stringliteral">&#39;None&#39;</span></div>
<div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>&#160;                    ):</div>
<div class="line"><a name="l01127"></a><span class="lineno"> 1127</span>&#160;                    v = repr(v)</div>
<div class="line"><a name="l01128"></a><span class="lineno"> 1128</span>&#160;                <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>&#160;                    v = <span class="keywordtype">None</span></div>
<div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>&#160;            <span class="keywordflow">if</span> v <span class="keywordflow">is</span> <span class="keywordflow">not</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>&#160;                params.append(<span class="stringliteral">&quot;%s=%s&quot;</span> % (k, v)) </div>
<div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>&#160;        param_lines = []</div>
<div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160;        line = <span class="stringliteral">&quot;&quot;</span></div>
<div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>&#160;        <span class="keywordflow">for</span> param <span class="keywordflow">in</span> params:</div>
<div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160;            <span class="keywordflow">if</span> len(line + param) + 3 &gt; max_cols - padding:</div>
<div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>&#160;                param_lines.append(line)</div>
<div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>&#160;                line = <span class="stringliteral">&quot;&quot;</span></div>
<div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>&#160;            line += param + <span class="stringliteral">&quot;, &quot;</span></div>
<div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160;        param_lines.append(line)</div>
<div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160;        param_str = (<span class="stringliteral">&quot;\n%s&quot;</span> % (<span class="stringliteral">&quot; &quot;</span> * padding)).join(param_lines)</div>
<div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>&#160;        <span class="keywordflow">return</span> <span class="stringliteral">&quot;%s(%s)&quot;</span> % (class_name, param_str)</div>
<div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>&#160;    <span class="keywordflow">except</span>:</div>
<div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>&#160;        <span class="keywordflow">raise</span></div>
<div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>&#160;        <span class="comment"># uninitialized, use standard representation to not break debuggers</span></div>
<div class="line"><a name="l01145"></a><span class="lineno"> 1145</span>&#160;        <span class="keywordflow">return</span> object.__repr__(obj)</div>
<div class="line"><a name="l01146"></a><span class="lineno"> 1146</span>&#160;</div>
<div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>&#160;</div>
<div class="line"><a name="l01148"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a937836205f3a4daa11179df3fc58e3c9"> 1148</a></span>&#160;<span class="keyword">def </span><a class="code" href="../../d9/d90/namespacegui_1_1component.html#a937836205f3a4daa11179df3fc58e3c9">get</a>(obj_name, init=False):</div>
<div class="line"><a name="l01149"></a><span class="lineno"> 1149</span>&#160;    <span class="stringliteral">&quot;Find an object already created&quot;</span></div>
<div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>&#160;    wx_parent = <span class="keywordtype">None</span></div>
<div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>&#160;    <span class="comment"># check if new_parent is given as string (useful for designer!)</span></div>
<div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>&#160;    <span class="keywordflow">if</span> isinstance(obj_name, basestring):</div>
<div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160;        <span class="comment"># find the object reference in the already created gui2py objects</span></div>
<div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>&#160;        <span class="comment"># TODO: only useful for designer, get a better way</span></div>
<div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160;        obj_parent = COMPONENTS.get(obj_name)</div>
<div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> obj_parent:</div>
<div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>&#160;            <span class="comment"># try to find window (it can be a plain wx frame/control)</span></div>
<div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>&#160;            wx_parent = wx.FindWindowByName(obj_name)</div>
<div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>&#160;            <span class="keywordflow">if</span> wx_parent:</div>
<div class="line"><a name="l01160"></a><span class="lineno"> 1160</span>&#160;                <span class="comment"># store gui object (if any)</span></div>
<div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>&#160;                obj_parent = getattr(wx_parent, <span class="stringliteral">&quot;obj&quot;</span>) </div>
<div class="line"><a name="l01162"></a><span class="lineno"> 1162</span>&#160;            <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>&#160;                <span class="comment"># fallback using just object name (backward compatibility)</span></div>
<div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>&#160;                <span class="keywordflow">for</span> obj <span class="keywordflow">in</span> COMPONENTS.values():</div>
<div class="line"><a name="l01165"></a><span class="lineno"> 1165</span>&#160;                    <span class="keywordflow">if</span> obj.name==obj_name:</div>
<div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>&#160;                        obj_parent = obj </div>
<div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>&#160;    <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>&#160;        obj_parent = obj_name     <span class="comment"># use the provided parent (as is)</span></div>
<div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>&#160;    <span class="keywordflow">return</span> obj_parent <span class="keywordflow">or</span> wx_parent       <span class="comment"># new parent</span></div>
<div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>&#160;</div>
<div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>&#160;</div>
<div class="line"><a name="l01172"></a><span class="lineno"> 1172</span>&#160;</div>
<div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>&#160;<span class="keywordflow">if</span> __name__ == <span class="stringliteral">&quot;__main__&quot;</span>:</div>
<div class="line"><a name="l01174"></a><span class="lineno"> 1174</span>&#160;    <span class="comment"># basic test until unit_test</span></div>
<div class="line"><a name="l01175"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a8f1d5f4a4709d958b9d6f9d4d1f69386"> 1175</a></span>&#160;    app = wx.App(redirect=<span class="keyword">False</span>)</div>
<div class="line"><a name="l01176"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a80c167eb518acbf3d30248fce9510494"> 1176</a></span>&#160;    frame = wx.Frame(<span class="keywordtype">None</span>)</div>
<div class="line"><a name="l01177"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a6485130dd9417b264ae4a0c1d241781e"> 1177</a></span>&#160;    w = <a class="code" href="../../d7/d98/classgui_1_1component_1_1Component.html">Component</a>(frame, name=<span class="stringliteral">&quot;test&quot;</span>)</div>
<div class="line"><a name="l01178"></a><span class="lineno"> 1178</span>&#160;    <span class="comment"># test representation:</span></div>
<div class="line"><a name="l01179"></a><span class="lineno"> 1179</span>&#160;    <span class="keywordflow">print</span> w</div>
<div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>&#160;    <span class="keyword">assert</span> w.get_parent() <span class="keywordflow">is</span> frame</div>
<div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>&#160;    <span class="keyword">assert</span> w.id != -1       <span class="comment"># wx should have assigned a new id!</span></div>
<div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>&#160;    <span class="keyword">assert</span> w.name == <span class="stringliteral">&quot;test&quot;</span></div>
<div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>&#160;    w.font = dict(face=<span class="stringliteral">&quot;ubuntu&quot;</span>)</div>
<div class="line"><a name="l01184"></a><span class="lineno"> 1184</span>&#160;    <span class="keyword">assert</span> w.font.face == <span class="stringliteral">&quot;ubuntu&quot;</span></div>
<div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>&#160;    <span class="comment"># check container methods:</span></div>
<div class="line"><a name="l01186"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a44ef50fbffd792cfd93e6c978c2c4037"> 1186</a></span>&#160;    ct1 = <a class="code" href="../../d3/dd2/classgui_1_1component_1_1Control.html">Control</a>(w, name=<span class="stringliteral">&quot;test_ctrl1&quot;</span>)</div>
<div class="line"><a name="l01187"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#a663906f0ded40bf5043f9cb2f5539a31"> 1187</a></span>&#160;    ct2 = <a class="code" href="../../d3/dd2/classgui_1_1component_1_1Control.html">Control</a>(w, name=<span class="stringliteral">&quot;test_ctrl2&quot;</span>)</div>
<div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160;    ct2.__init__(name=<span class="stringliteral">&quot;chau!&quot;</span>)      <span class="comment"># recreate the control (!= name)</span></div>
<div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;    <span class="keyword">assert</span> ct1.index == 0</div>
<div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>&#160;    <span class="keyword">assert</span> ct2.index == 1</div>
<div class="line"><a name="l01191"></a><span class="lineno"><a class="line" href="../../d9/d90/namespacegui_1_1component.html#aa91bde1e8e6b7ee91d9fbde43a3426ae"> 1191</a></span>&#160;    names = []</div>
<div class="line"><a name="l01192"></a><span class="lineno"> 1192</span>&#160;    <span class="keywordflow">for</span> c <span class="keywordflow">in</span> w:</div>
<div class="line"><a name="l01193"></a><span class="lineno"> 1193</span>&#160;        names.append(c.name)</div>
<div class="line"><a name="l01194"></a><span class="lineno"> 1194</span>&#160;    <span class="keyword">assert</span> names == [<span class="stringliteral">&quot;test_ctrl1&quot;</span>, <span class="stringliteral">&quot;chau!&quot;</span>]</div>
<div class="line"><a name="l01195"></a><span class="lineno"> 1195</span>&#160;</div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a2a4e1ce9390e14e18785d56086a422c5"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a2a4e1ce9390e14e18785d56086a422c5">gui.component.Component.duplicate</a></div><div class="ttdeci">def duplicate</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00277">component.py:277</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a9faae286a706388b11b9debdf4daf39a"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a9faae286a706388b11b9debdf4daf39a">gui.component.ControlSuper._calc_dimension</a></div><div class="ttdeci">def _calc_dimension</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00718">component.py:718</a></div></div>
<div class="ttc" id="namespacegui_1_1component_html_ad5c2b0e24b70b06644b3de48659e4231"><div class="ttname"><a href="../../d9/d90/namespacegui_1_1component.html#ad5c2b0e24b70b06644b3de48659e4231">gui.component.represent</a></div><div class="ttdeci">def represent</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01103">component.py:1103</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_aad59f981ea35d6df7a04cc3f998df702"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#aad59f981ea35d6df7a04cc3f998df702">gui.component.Component._get_default_color</a></div><div class="ttdeci">def _get_default_color</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00499">component.py:499</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a28595cf19311a9dc18ae93bf31c066fc"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a28595cf19311a9dc18ae93bf31c066fc">gui.component.Component._get_font</a></div><div class="ttdeci">def _get_font</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00432">component.py:432</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_af58429399152c275ceb33ed4e99ffe3d"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#af58429399152c275ceb33ed4e99ffe3d">gui.component.Component._width</a></div><div class="ttdeci">_width</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00231">component.py:231</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a9410e5de2d11e2deea2b761b86500c48"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a9410e5de2d11e2deea2b761b86500c48">gui.component.Component._set_drop_target</a></div><div class="ttdeci">def _set_drop_target</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00536">component.py:536</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a32e7774708f187eb526477a441a66f6b"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a32e7774708f187eb526477a441a66f6b">gui.component.Component.parent</a></div><div class="ttdeci">tuple parent</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00556">component.py:556</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_abfd05bb211fa6d33d9d501229068c00b"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#abfd05bb211fa6d33d9d501229068c00b">gui.component.Component._fgcolor</a></div><div class="ttdeci">_fgcolor</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00124">component.py:124</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SubComponent_html_a796d83089d10ae7d8cc4677b532a517f"><div class="ttname"><a href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a796d83089d10ae7d8cc4677b532a517f">gui.component.SubComponent.destroy</a></div><div class="ttdeci">def destroy</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01075">component.py:1075</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ComponentBase_html_a1e1e9e905348b74b46c8bfddc0fb078d"><div class="ttname"><a href="../../d1/db2/classgui_1_1component_1_1ComponentBase.html#a1e1e9e905348b74b46c8bfddc0fb078d">gui.component.ComponentBase.__new__</a></div><div class="ttdeci">def __new__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00051">component.py:51</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a067b3e4f00ead528f81de3fa26091674"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a067b3e4f00ead528f81de3fa26091674">gui.component.ControlSuper.margin_left</a></div><div class="ttdeci">tuple margin_left</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00893">component.py:893</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a7c21f30ba7fa9f98d28ddec39eef006f"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7c21f30ba7fa9f98d28ddec39eef006f">gui.component.ControlSuper._margins</a></div><div class="ttdeci">_margins</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00699">component.py:699</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a8c230af4fd75f85f8f555bf9a90f469f"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a8c230af4fd75f85f8f555bf9a90f469f">gui.component.Component._get_fgcolor</a></div><div class="ttdeci">def _get_fgcolor</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00462">component.py:462</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1DesignerMixin_html_a5a74dc3d6f623c6e8c2a4617774c41ce"><div class="ttname"><a href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a5a74dc3d6f623c6e8c2a4617774c41ce">gui.component.DesignerMixin.facade</a></div><div class="ttdeci">tuple facade</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00627">component.py:627</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1DesignerMixin_html_a26c41232d343c0bc5229da935da7ad31"><div class="ttname"><a href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a26c41232d343c0bc5229da935da7ad31">gui.component.DesignerMixin.snapshot</a></div><div class="ttdeci">def snapshot</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00592">component.py:592</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SubComponent_html"><div class="ttname"><a href="../../dc/d07/classgui_1_1component_1_1SubComponent.html">gui.component.SubComponent</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01039">component.py:1039</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ImageBackgroundMixin_html_acb097445bcb15fda50c8ef0a2f3577f9"><div class="ttname"><a href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#acb097445bcb15fda50c8ef0a2f3577f9">gui.component.ImageBackgroundMixin._set_image</a></div><div class="ttdeci">def _set_image</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00964">component.py:964</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a23b31afece34b6d5d5c7348d14d9ae9b"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a23b31afece34b6d5d5c7348d14d9ae9b">gui.component.Component.__iter__</a></div><div class="ttdeci">def __iter__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00322">component.py:322</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a8ed4b7c8565bf3f775fd8f24dfbac818"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a8ed4b7c8565bf3f775fd8f24dfbac818">gui.component.Component._wx_kwargs</a></div><div class="ttdeci">_wx_kwargs</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00159">component.py:159</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SizerMixin_html_af253e2a63882069e771a85a12241cc56"><div class="ttname"><a href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#af253e2a63882069e771a85a12241cc56">gui.component.SizerMixin._sizer_add</a></div><div class="ttdeci">def _sizer_add</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00662">component.py:662</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_afca69a2b56bcce7a162ce1a55aed7d35"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#afca69a2b56bcce7a162ce1a55aed7d35">gui.component.Component._children_list</a></div><div class="ttdeci">_children_list</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00127">component.py:127</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_abaa2cd80a892a4933aea479a7a97c093"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#abaa2cd80a892a4933aea479a7a97c093">gui.component.ControlSuper._set_top</a></div><div class="ttdeci">def _set_top</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00777">component.py:777</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ComponentMeta_html"><div class="ttname"><a href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html">gui.component.ComponentMeta</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00039">component.py:39</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ComponentMeta_html_aed0faecc101658abbe1e061859673a9b"><div class="ttname"><a href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#aed0faecc101658abbe1e061859673a9b">gui.component.ComponentMeta.valid_children</a></div><div class="ttdeci">valid_children</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00044">component.py:44</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1DesignerMixin_html_a98bb76cf072254249cbe6b0b34b84e66"><div class="ttname"><a href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a98bb76cf072254249cbe6b0b34b84e66">gui.component.DesignerMixin.sel_marker</a></div><div class="ttdeci">tuple sel_marker</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00632">component.py:632</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a5cf6eed24d1856851f1d50f3b3319dcc"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a5cf6eed24d1856851f1d50f3b3319dcc">gui.component.Component._parent</a></div><div class="ttdeci">_parent</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00365">component.py:365</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a7c87cb830ddcb27f667a466ad28c0a94"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7c87cb830ddcb27f667a466ad28c0a94">gui.component.ControlSuper._get_pos</a></div><div class="ttdeci">def _get_pos</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00740">component.py:740</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SizerMixin_html_a75ee983eb8e5bef7bbbc324e7edfbc2c"><div class="ttname"><a href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a75ee983eb8e5bef7bbbc324e7edfbc2c">gui.component.SizerMixin._set_sizer</a></div><div class="ttdeci">def _set_sizer</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00642">component.py:642</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SubComponent_html_a87a3382b8aaffab709351a9550cf06ca"><div class="ttname"><a href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a87a3382b8aaffab709351a9550cf06ca">gui.component.SubComponent._parent</a></div><div class="ttdeci">_parent</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01066">component.py:1066</a></div></div>
<div class="ttc" id="namespacegui_1_1component_html_aea9af37046faf801b2ee9af862045b26"><div class="ttname"><a href="../../d9/d90/namespacegui_1_1component.html#aea9af37046faf801b2ee9af862045b26">gui.component.get_sort_key</a></div><div class="ttdeci">def get_sort_key</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01099">component.py:1099</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_ac5cfbd4fdf26625760ad692660e25357"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#ac5cfbd4fdf26625760ad692660e25357">gui.component.Component.__delitem__</a></div><div class="ttdeci">def __delitem__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00337">component.py:337</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_af746236f93baeb6dffa429d430be6728"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#af746236f93baeb6dffa429d430be6728">gui.component.Component._set_name</a></div><div class="ttdeci">def _set_name</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00400">component.py:400</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ComponentMeta_html_ac6589e4ebfceeeb2c5d9397ba64c0c1d"><div class="ttname"><a href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#ac6589e4ebfceeeb2c5d9397ba64c0c1d">gui.component.ComponentMeta.name</a></div><div class="ttdeci">name</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00042">component.py:42</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a814a311328f2d8bb6fa6c9db969725ef"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a814a311328f2d8bb6fa6c9db969725ef">gui.component.Component.name</a></div><div class="ttdeci">tuple name</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00546">component.py:546</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SizerMixin_html_a1ec131f2e0f74b86e02c8f82b4e18378"><div class="ttname"><a href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a1ec131f2e0f74b86e02c8f82b4e18378">gui.component.SizerMixin.sizer</a></div><div class="ttdeci">tuple sizer</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00677">component.py:677</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_acbdb124e99dec5734d547f82f85b92f0"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#acbdb124e99dec5734d547f82f85b92f0">gui.component.Component._name</a></div><div class="ttdeci">_name</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00406">component.py:406</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a2c6be5dc136f0ada78b1b9c4db6eaabc"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a2c6be5dc136f0ada78b1b9c4db6eaabc">gui.component.Component.__repr__</a></div><div class="ttdeci">def __repr__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00413">component.py:413</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a4351a66d174daec4d6e24ef087536c46"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a4351a66d174daec4d6e24ef087536c46">gui.component.Component._setUserdata</a></div><div class="ttdeci">def _setUserdata</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00496">component.py:496</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1DesignerMixin_html"><div class="ttname"><a href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html">gui.component.DesignerMixin</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00567">component.py:567</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_abe66de1519e6157fa2bb58828b2690e3"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#abe66de1519e6157fa2bb58828b2690e3">gui.component.Component._set_fgcolor</a></div><div class="ttdeci">def _set_fgcolor</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00442">component.py:442</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a4f585e33ebe97e70b8ec5ceff7cb57e2"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a4f585e33ebe97e70b8ec5ceff7cb57e2">gui.component.Component.wx_obj</a></div><div class="ttdeci">wx_obj</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00130">component.py:130</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ComponentMeta_html_aa097f2ce1c36fd36b66714feea9ee641"><div class="ttname"><a href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#aa097f2ce1c36fd36b66714feea9ee641">gui.component.ComponentMeta.specs</a></div><div class="ttdeci">specs</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00043">component.py:43</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a0c4c99417623d8e4a809e1f3f43aeaea"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a0c4c99417623d8e4a809e1f3f43aeaea">gui.component.Component.reindex</a></div><div class="ttdeci">def reindex</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00298">component.py:298</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a7d5ce0fc0165e6c410ce84e1cfad021e"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a7d5ce0fc0165e6c410ce84e1cfad021e">gui.component.ControlSuper._get_margin</a></div><div class="ttdeci">def _get_margin</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00838">component.py:838</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_ad712fca170ef6df1933a3601023075ba"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ad712fca170ef6df1933a3601023075ba">gui.component.ControlSuper._get_size</a></div><div class="ttdeci">def _get_size</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00780">component.py:780</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_ace3b877725a11c910667016dc2781748"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ace3b877725a11c910667016dc2781748">gui.component.ControlSuper.__init__</a></div><div class="ttdeci">def __init__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00694">component.py:694</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a38b6ef236dbf70e06e0c65705d78ac50"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a38b6ef236dbf70e06e0c65705d78ac50">gui.component.Component.rebuild</a></div><div class="ttdeci">def rebuild</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00235">component.py:235</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ComponentBase_html"><div class="ttname"><a href="../../d1/db2/classgui_1_1component_1_1ComponentBase.html">gui.component.ComponentBase</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00049">component.py:49</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SizerMixin_html"><div class="ttname"><a href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html">gui.component.SizerMixin</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00637">component.py:637</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a19bf8049dd4458d7278daf736d6eed7b"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a19bf8049dd4458d7278daf736d6eed7b">gui.component.Component._getUserdata</a></div><div class="ttdeci">def _getUserdata</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00493">component.py:493</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a445a5f5882038364bc76ed9790ca1428"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a445a5f5882038364bc76ed9790ca1428">gui.component.Component._setVisible</a></div><div class="ttdeci">def _setVisible</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00525">component.py:525</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1DesignerMixin_html_a004f92183b676666efbdddcd4bab824d"><div class="ttname"><a href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a004f92183b676666efbdddcd4bab824d">gui.component.DesignerMixin.rebuild</a></div><div class="ttdeci">def rebuild</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00616">component.py:616</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SizerMixin_html_a0fb44b09a9df40c0c53fd45e81534c29"><div class="ttname"><a href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a0fb44b09a9df40c0c53fd45e81534c29">gui.component.SizerMixin._get_sizer</a></div><div class="ttdeci">def _get_sizer</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00656">component.py:656</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a83bf6108298ad8d8e8febed78237261a"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a83bf6108298ad8d8e8febed78237261a">gui.component.Component._left</a></div><div class="ttdeci">_left</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00225">component.py:225</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a9e841f80226d6be4dea910847f78b927"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a9e841f80226d6be4dea910847f78b927">gui.component.Component._bgcolor</a></div><div class="ttdeci">_bgcolor</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00124">component.py:124</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a0c19fdbfb03a0b59c1e36e248ef029c4"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a0c19fdbfb03a0b59c1e36e248ef029c4">gui.component.Component._getId</a></div><div class="ttdeci">def _getId</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00418">component.py:418</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ImageBackgroundMixin_html_a2b71254b22fcd5f9583415b0dd497db8"><div class="ttname"><a href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a2b71254b22fcd5f9583415b0dd497db8">gui.component.ImageBackgroundMixin.__on_erase_background</a></div><div class="ttdeci">def __on_erase_background</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01015">component.py:1015</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Control_html"><div class="ttname"><a href="../../d3/dd2/classgui_1_1component_1_1Control.html">gui.component.Control</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00943">component.py:943</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ComponentMeta_html_abf6dbc2a7c6a9591b18f317659b5ebdb"><div class="ttname"><a href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#abf6dbc2a7c6a9591b18f317659b5ebdb">gui.component.ComponentMeta.__init__</a></div><div class="ttdeci">def __init__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00041">component.py:41</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a8770ad042011a483d2dc29da4c5fd48c"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a8770ad042011a483d2dc29da4c5fd48c">gui.component.ControlSuper.width</a></div><div class="ttdeci">tuple width</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00881">component.py:881</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ImageBackgroundMixin_html_a8d80cee10635db3cce6c6d93cfdd6dca"><div class="ttname"><a href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a8d80cee10635db3cce6c6d93cfdd6dca">gui.component.ImageBackgroundMixin.__on_destroy</a></div><div class="ttdeci">def __on_destroy</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01010">component.py:1010</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1DesignerMixin_html_a901b2ef5e3e6b947f0c5a8cc57ec9210"><div class="ttname"><a href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a901b2ef5e3e6b947f0c5a8cc57ec9210">gui.component.DesignerMixin._set_facade</a></div><div class="ttdeci">def _set_facade</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00604">component.py:604</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a485519b5a8d351bbb3d79b893968cc11"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a485519b5a8d351bbb3d79b893968cc11">gui.component.ControlSuper.get_char_width</a></div><div class="ttdeci">def get_char_width</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00867">component.py:867</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1DesignerMixin_html_af6fd0f04305fba59d556b2e3e71f7574"><div class="ttname"><a href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#af6fd0f04305fba59d556b2e3e71f7574">gui.component.DesignerMixin._facade</a></div><div class="ttdeci">_facade</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00610">component.py:610</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a8840a9ac7832fd8ceffe76fa78c3395b"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a8840a9ac7832fd8ceffe76fa78c3395b">gui.component.Component.__init__</a></div><div class="ttdeci">def __init__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00093">component.py:93</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SizerMixin_html_a9ba0405f06664883a262906c8a8ec0bf"><div class="ttname"><a href="../../d1/d96/classgui_1_1component_1_1SizerMixin.html#a9ba0405f06664883a262906c8a8ec0bf">gui.component.SizerMixin._sizer</a></div><div class="ttdeci">_sizer</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00646">component.py:646</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a2e83ac3b6fe325c0ec3dc76b9b6cbc73"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a2e83ac3b6fe325c0ec3dc76b9b6cbc73">gui.component.ControlSuper._set_width</a></div><div class="ttdeci">def _set_width</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00828">component.py:828</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ImageBackgroundMixin_html_adb0a9358c4fc0d64a40af727a40eb38c"><div class="ttname"><a href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#adb0a9358c4fc0d64a40af727a40eb38c">gui.component.ImageBackgroundMixin._get_image</a></div><div class="ttdeci">def _get_image</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00984">component.py:984</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ImageBackgroundMixin_html_a6d37025265baa61c86ed43eda9c41f5a"><div class="ttname"><a href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#a6d37025265baa61c86ed43eda9c41f5a">gui.component.ImageBackgroundMixin._bitmap</a></div><div class="ttdeci">_bitmap</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00971">component.py:971</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a3ae76ac584aeb9c75b867165a31c77ab"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a3ae76ac584aeb9c75b867165a31c77ab">gui.component.Component.set_focus</a></div><div class="ttdeci">def set_focus</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00359">component.py:359</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a1a69c5d9f7d80facc24f0d7d5a80d299"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a1a69c5d9f7d80facc24f0d7d5a80d299">gui.component.Component._get_bgcolor</a></div><div class="ttdeci">def _get_bgcolor</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00470">component.py:470</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_aff477be6ffebb453465d6403a57738a3"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#aff477be6ffebb453465d6403a57738a3">gui.component.Component.__getitem__</a></div><div class="ttdeci">def __getitem__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00331">component.py:331</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_aaab6b5b527f205a95789d513ed32bdba"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#aaab6b5b527f205a95789d513ed32bdba">gui.component.Component._wx_class</a></div><div class="ttdeci">_wx_class</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00089">component.py:89</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_af3df42fd86675ecdea82dc1338542649"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#af3df42fd86675ecdea82dc1338542649">gui.component.Component.__del__</a></div><div class="ttdeci">def __del__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00252">component.py:252</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a72e2ac700706106ac8c42000000775b5"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a72e2ac700706106ac8c42000000775b5">gui.component.Component._setToolTip</a></div><div class="ttdeci">def _setToolTip</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00478">component.py:478</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_af7da9a2f14096ec1d60c95985541e8d7"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#af7da9a2f14096ec1d60c95985541e8d7">gui.component.Component._getToolTip</a></div><div class="ttdeci">def _getToolTip</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00426">component.py:426</a></div></div>
<div class="ttc" id="namespacegui_1_1component_html_acbdd7327932847cde657f8cac3613ccf"><div class="ttname"><a href="../../d9/d90/namespacegui_1_1component.html#acbdd7327932847cde657f8cac3613ccf">gui.component.wx_WrapSizer</a></div><div class="ttdeci">wx_WrapSizer</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00034">component.py:34</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1DesignerMixin_html_a6cf9c184680c89aeba622e24cda72529"><div class="ttname"><a href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a6cf9c184680c89aeba622e24cda72529">gui.component.DesignerMixin.designer</a></div><div class="ttdeci">tuple designer</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00622">component.py:622</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ImageBackgroundMixin_html_ada7ece201bb2583a5f02f579271b51ca"><div class="ttname"><a href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#ada7ece201bb2583a5f02f579271b51ca">gui.component.ImageBackgroundMixin.__tile_background</a></div><div class="ttdeci">def __tile_background</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00987">component.py:987</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_aa812f0a51010e748dc107a31e34a7781"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#aa812f0a51010e748dc107a31e34a7781">gui.component.Component._getEnabled</a></div><div class="ttdeci">def _getEnabled</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00516">component.py:516</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html">gui.component.Component</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00077">component.py:77</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_ad146f1473fa23139699d793758a6aaee"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#ad146f1473fa23139699d793758a6aaee">gui.component.Component.set_parent</a></div><div class="ttdeci">def set_parent</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00362">component.py:362</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_aadd45821f352e5df10edc11a9e609105"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aadd45821f352e5df10edc11a9e609105">gui.component.ControlSuper._set_pos</a></div><div class="ttdeci">def _set_pos</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00744">component.py:744</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a17fb25dd4c1b68f28fc239d2ab5d3e0c"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a17fb25dd4c1b68f28fc239d2ab5d3e0c">gui.component.ControlSuper._set_margin</a></div><div class="ttdeci">def _set_margin</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00841">component.py:841</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a79f0952c8c1e9e639e219c97944a1147"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a79f0952c8c1e9e639e219c97944a1147">gui.component.ControlSuper._set_size</a></div><div class="ttdeci">def _set_size</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00787">component.py:787</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_ab1d4f5cb9769d145ebf1f1db21f5b9aa"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#ab1d4f5cb9769d145ebf1f1db21f5b9aa">gui.component.Component._top</a></div><div class="ttdeci">_top</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00227">component.py:227</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a311db6e15161ccbe876a1ff7662ba2a2"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a311db6e15161ccbe876a1ff7662ba2a2">gui.component.Component._get_parent_name</a></div><div class="ttdeci">def _get_parent_name</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00371">component.py:371</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_ae92b3961491af2a2273baa295b8e1e4a"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#ae92b3961491af2a2273baa295b8e1e4a">gui.component.ControlSuper.set_parent</a></div><div class="ttdeci">def set_parent</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00707">component.py:707</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SubComponent_html_afed385eb1b473379461eef54d7e1e5a6"><div class="ttname"><a href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#afed385eb1b473379461eef54d7e1e5a6">gui.component.SubComponent.rebuild</a></div><div class="ttdeci">def rebuild</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01070">component.py:1070</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_aef1d100fe1c668847583366148620873"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#aef1d100fe1c668847583366148620873">gui.component.Component._get_fully_qualified_name</a></div><div class="ttdeci">def _get_fully_qualified_name</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00389">component.py:389</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a0fc90ac29b4b9a361dec93202bc8444a"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a0fc90ac29b4b9a361dec93202bc8444a">gui.component.Component._get_drop_target</a></div><div class="ttdeci">def _get_drop_target</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00532">component.py:532</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_aa93690dc156721aa95e191ecafd1f940"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#aa93690dc156721aa95e191ecafd1f940">gui.component.Component._drop_target</a></div><div class="ttdeci">_drop_target</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00541">component.py:541</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a51646b033b8051928dc38991c3df1593"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a51646b033b8051928dc38991c3df1593">gui.component.ControlSuper.margin_right</a></div><div class="ttdeci">tuple margin_right</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00899">component.py:899</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SubComponent_html_a4e59e87efe87739885396f52af179c86"><div class="ttname"><a href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a4e59e87efe87739885396f52af179c86">gui.component.SubComponent.__repr__</a></div><div class="ttdeci">def __repr__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01078">component.py:1078</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ImageBackgroundMixin_html"><div class="ttname"><a href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html">gui.component.ImageBackgroundMixin</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00959">component.py:959</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a24b89ca59d3def616f3cb71878a61d16"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a24b89ca59d3def616f3cb71878a61d16">gui.component.Component._style</a></div><div class="ttdeci">int _style</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00090">component.py:90</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_aa5e963ca7c0e85dda2d7763a5a6883f6"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#aa5e963ca7c0e85dda2d7763a5a6883f6">gui.component.Component.__exit__</a></div><div class="ttdeci">def __exit__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00348">component.py:348</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a81c05bce87b2980cd7ab5ab22fd5189b"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a81c05bce87b2980cd7ab5ab22fd5189b">gui.component.ControlSuper.get_char_height</a></div><div class="ttdeci">def get_char_height</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00871">component.py:871</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a8f6cb81e7f6459e6871b084af54b7286"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a8f6cb81e7f6459e6871b084af54b7286">gui.component.Component.__setitem__</a></div><div class="ttdeci">def __setitem__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00325">component.py:325</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_aa777e42e418b9e9517dcd4aae5cf1430"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#aa777e42e418b9e9517dcd4aae5cf1430">gui.component.ControlSuper.resize</a></div><div class="ttdeci">def resize</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00847">component.py:847</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_aee407093fea1b51db38cf665dfd18003"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#aee407093fea1b51db38cf665dfd18003">gui.component.Component._height</a></div><div class="ttdeci">_height</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00233">component.py:233</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SubComponent_html_a1b01b92db47fd5bcb52cb797c6737056"><div class="ttname"><a href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a1b01b92db47fd5bcb52cb797c6737056">gui.component.SubComponent.__iter__</a></div><div class="ttdeci">def __iter__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01045">component.py:1045</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html">gui.component.ControlSuper</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00684">component.py:684</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a7422d4b1d8b3973416b46dd67857b751"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a7422d4b1d8b3973416b46dd67857b751">gui.component.Component._font</a></div><div class="ttdeci">_font</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00123">component.py:123</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a06e3511fc8b0141f2b6323e2037578b4"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a06e3511fc8b0141f2b6323e2037578b4">gui.component.ControlSuper.height</a></div><div class="ttdeci">tuple height</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00884">component.py:884</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a09a4103fece8d89d1a758d40f9ab4c78"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a09a4103fece8d89d1a758d40f9ab4c78">gui.component.Component._getVisible</a></div><div class="ttdeci">def _getVisible</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00522">component.py:522</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_add0ae7d52f03c1a03aea7cc58e868e61"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#add0ae7d52f03c1a03aea7cc58e868e61">gui.component.Component._get_name</a></div><div class="ttdeci">def _get_name</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00397">component.py:397</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a7f8e1c39a0868217aa1def6153943e2e"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a7f8e1c39a0868217aa1def6153943e2e">gui.component.Component._set_font</a></div><div class="ttdeci">def _set_font</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00482">component.py:482</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a776fe39f335ec0db8da8a1065adc5a93"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a776fe39f335ec0db8da8a1065adc5a93">gui.component.Component._setId</a></div><div class="ttdeci">def _setId</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00422">component.py:422</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ImageBackgroundMixin_html_af2c25edd54f842dcdb1a5f27b9289300"><div class="ttname"><a href="../../dc/dbd/classgui_1_1component_1_1ImageBackgroundMixin.html#af2c25edd54f842dcdb1a5f27b9289300">gui.component.ImageBackgroundMixin._image_filename</a></div><div class="ttdeci">_image_filename</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00966">component.py:966</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SubComponent_html_abbd0beed5e2f9ca4c85c159aa2336fd2"><div class="ttname"><a href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#abbd0beed5e2f9ca4c85c159aa2336fd2">gui.component.SubComponent.set_parent</a></div><div class="ttdeci">def set_parent</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01063">component.py:1063</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a87cf1202a1dcc65d07253b6c5529e40f"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a87cf1202a1dcc65d07253b6c5529e40f">gui.component.Component._set_bgcolor</a></div><div class="ttdeci">def _set_bgcolor</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00452">component.py:452</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ComponentMeta_html_ab7b249e14e303e4ba375043ac1ce7517"><div class="ttname"><a href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#ab7b249e14e303e4ba375043ac1ce7517">gui.component.ComponentMeta.container</a></div><div class="ttdeci">container</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00046">component.py:46</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a99163a2fe83972b5e624f751c14c8edc"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a99163a2fe83972b5e624f751c14c8edc">gui.component.ControlSuper.margin_bottom</a></div><div class="ttdeci">tuple margin_bottom</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00902">component.py:902</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a3d8f3873f0dde58ce5e99fbb776c6502"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a3d8f3873f0dde58ce5e99fbb776c6502">gui.component.Component._children_dict</a></div><div class="ttdeci">_children_dict</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00126">component.py:126</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_afbf6675f7d4282b7c5b9d510569561d0"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#afbf6675f7d4282b7c5b9d510569561d0">gui.component.Component.__enter__</a></div><div class="ttdeci">def __enter__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00343">component.py:343</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_af529a328ae490465496ad40a4097ea0d"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#af529a328ae490465496ad40a4097ea0d">gui.component.ControlSuper._resizable</a></div><div class="ttdeci">_resizable</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00697">component.py:697</a></div></div>
<div class="ttc" id="namespacegui_1_1component_html_a5334beaff782e6f4b7f39e4d000539cb"><div class="ttname"><a href="../../d9/d90/namespacegui_1_1component.html#a5334beaff782e6f4b7f39e4d000539cb">gui.component.new_id</a></div><div class="ttdeci">def new_id</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01089">component.py:1089</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1DesignerMixin_html_a0f07c4b7d463f32232528125b49fc449"><div class="ttname"><a href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#a0f07c4b7d463f32232528125b49fc449">gui.component.DesignerMixin._set_designer</a></div><div class="ttdeci">def _set_designer</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00572">component.py:572</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_ab3281867fe2a98d3bc5efa490b3ee61a"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#ab3281867fe2a98d3bc5efa490b3ee61a">gui.component.Component.drop_target</a></div><div class="ttdeci">tuple drop_target</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00559">component.py:559</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a8ad2d0f13c5877defe52377e9f32a187"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a8ad2d0f13c5877defe52377e9f32a187">gui.component.ControlSuper.margin_top</a></div><div class="ttdeci">tuple margin_top</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00896">component.py:896</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a22d66b10bb4fbe00b4d237c42dae1264"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a22d66b10bb4fbe00b4d237c42dae1264">gui.component.Component.get_parent</a></div><div class="ttdeci">def get_parent</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00367">component.py:367</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_a5d8a866e98fee78e792a4a821ad2ba8c"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#a5d8a866e98fee78e792a4a821ad2ba8c">gui.component.ControlSuper._set_height</a></div><div class="ttdeci">def _set_height</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00833">component.py:833</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ComponentMeta_html_a34a7f2319dd859b55d0d8776ed453962"><div class="ttname"><a href="../../dd/d01/classgui_1_1component_1_1ComponentMeta.html#a34a7f2319dd859b55d0d8776ed453962">gui.component.ComponentMeta.facade</a></div><div class="ttdeci">facade</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00045">component.py:45</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a878dfade57f994abd7b7df40bad3505f"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a878dfade57f994abd7b7df40bad3505f">gui.component.Component.destroy</a></div><div class="ttdeci">def destroy</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00256">component.py:256</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a747e3b93be49b1cb7c09cd8ac7cf6fad"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a747e3b93be49b1cb7c09cd8ac7cf6fad">gui.component.Component.redraw</a></div><div class="ttdeci">def redraw</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00354">component.py:354</a></div></div>
<div class="ttc" id="namespacegui_1_1component_html_a937836205f3a4daa11179df3fc58e3c9"><div class="ttname"><a href="../../d9/d90/namespacegui_1_1component.html#a937836205f3a4daa11179df3fc58e3c9">gui.component.get</a></div><div class="ttdeci">def get</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01148">component.py:1148</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SubComponent_html_a8332046f36f996801873dd4610cfafd5"><div class="ttname"><a href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a8332046f36f996801873dd4610cfafd5">gui.component.SubComponent.__getitem__</a></div><div class="ttdeci">def __getitem__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01048">component.py:1048</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_a05be9ff400ef105070411cc568639cb1"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#a05be9ff400ef105070411cc568639cb1">gui.component.Component._userdata</a></div><div class="ttdeci">_userdata</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00497">component.py:497</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1DesignerMixin_html_acc40627321b60dd37b02eb1fa05894af"><div class="ttname"><a href="../../d4/d3f/classgui_1_1component_1_1DesignerMixin.html#acc40627321b60dd37b02eb1fa05894af">gui.component.DesignerMixin._designer</a></div><div class="ttdeci">_designer</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00588">component.py:588</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1Component_html_af6865f9100a4237c1ffe6ccd6c720bb4"><div class="ttname"><a href="../../d7/d98/classgui_1_1component_1_1Component.html#af6865f9100a4237c1ffe6ccd6c720bb4">gui.component.Component._setEnabled</a></div><div class="ttdeci">def _setEnabled</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00519">component.py:519</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1ControlSuper_html_affbafdf05c45ddd850c9ee6f6ac067e6"><div class="ttname"><a href="../../d1/d9f/classgui_1_1component_1_1ControlSuper.html#affbafdf05c45ddd850c9ee6f6ac067e6">gui.component.ControlSuper._set_left</a></div><div class="ttdeci">def _set_left</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l00774">component.py:774</a></div></div>
<div class="ttc" id="classgui_1_1component_1_1SubComponent_html_a9e9780792226a60af754524c7bbd77d8"><div class="ttname"><a href="../../dc/d07/classgui_1_1component_1_1SubComponent.html#a9e9780792226a60af754524c7bbd77d8">gui.component.SubComponent.__init__</a></div><div class="ttdeci">def __init__</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py_source.html#l01051">component.py:1051</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_96a7eeec1342994a7cb0d7fe7902ae74.html">build</a></li><li class="navelem"><a class="el" href="../../dir_3740601ea11ece1a00f9273977396bc4.html">lib.linux-x86_64-2.7</a></li><li class="navelem"><a class="el" href="../../dir_5bcb0661a26d4ce62009196be9ab2e39.html">gui</a></li><li class="navelem"><a class="el" href="../../d2/d08/build_2lib_8linux-x86__64-2_87_2gui_2component_8py.html">component.py</a></li>
    <li class="footer">Generado el Domingo, 7 de Diciembre de 2014 18:59:47 para gui2py por
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
